WebKit Bugzilla
Attachment 341621 Details for
Bug 185246
: AX: VoiceOver on macOS does not announce fieldset description from aria-describedby when focussing inputs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
patch.txt (text/plain), 4.73 KB, created by
Nan Wang
on 2018-05-30 16:39:44 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Nan Wang
Created:
2018-05-30 16:39:44 PDT
Size:
4.73 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 232317) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2018-05-30 Nan Wang <n_wang@apple.com> >+ >+ AX: VoiceOver on macOS does not announce fieldset description from aria-describedby when focussing inputs >+ https://bugs.webkit.org/show_bug.cgi?id=185246 >+ <rdar://problem/39939028> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Exposed the fieldset's description to its form control children. >+ >+ Test: accessibility/mac/aria-describedby-fieldset.html >+ >+ * accessibility/AccessibilityNodeObject.cpp: >+ (WebCore::AccessibilityNodeObject::helpText const): >+ > 2018-05-30 Daniel Bates <dabates@apple.com> > > NavigationAction does not need to hold initiating DOM Event >Index: Source/WebCore/accessibility/AccessibilityNodeObject.cpp >=================================================================== >--- Source/WebCore/accessibility/AccessibilityNodeObject.cpp (revision 232315) >+++ Source/WebCore/accessibility/AccessibilityNodeObject.cpp (working copy) >@@ -1441,6 +1441,16 @@ void AccessibilityNodeObject::helpText(V > String describedBy = ariaDescribedByAttribute(); > if (!describedBy.isEmpty()) > textOrder.append(AccessibilityText(describedBy, AccessibilityTextSource::Summary)); >+ else { >+ // For controls, use their fieldset parent's described-by text if avaialble. >+ if (isControl()) { >+ auto matchFunc = [] (const AccessibilityObject& object) { >+ return object.isFieldset() && !object.ariaDescribedByAttribute().isEmpty(); >+ }; >+ if (const auto* parent = AccessibilityObject::matchedParent(*this, false, WTFMove(matchFunc))) >+ textOrder.append(AccessibilityText(parent->ariaDescribedByAttribute(), AccessibilityTextSource::Summary)); >+ } >+ } > > // Summary attribute used as help text on tables. > const AtomicString& summary = getAttribute(summaryAttr); >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 232315) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2018-05-30 Nan Wang <n_wang@apple.com> >+ >+ AX: VoiceOver on macOS does not announce fieldset description from aria-describedby when focussing inputs >+ https://bugs.webkit.org/show_bug.cgi?id=185246 >+ <rdar://problem/39939028> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * accessibility/mac/aria-describedby-fieldset-expected.txt: Added. >+ * accessibility/mac/aria-describedby-fieldset.html: Added. >+ > 2018-05-29 Keith Miller <keith_miller@apple.com> > > Error instances should not strongly hold onto StackFrames >Index: LayoutTests/accessibility/mac/aria-describedby-fieldset-expected.txt >=================================================================== >--- LayoutTests/accessibility/mac/aria-describedby-fieldset-expected.txt (nonexistent) >+++ LayoutTests/accessibility/mac/aria-describedby-fieldset-expected.txt (working copy) >@@ -0,0 +1,12 @@ >+Some hint Yes No >+This tests form controls use their fieldset parent's description as AXHelp. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS yesRadio.helpText is 'AXHelp: Some hint' >+PASS noRadio.helpText is 'AXHelp: Some hint' >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >Index: LayoutTests/accessibility/mac/aria-describedby-fieldset.html >=================================================================== >--- LayoutTests/accessibility/mac/aria-describedby-fieldset.html (nonexistent) >+++ LayoutTests/accessibility/mac/aria-describedby-fieldset.html (working copy) >@@ -0,0 +1,37 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+<head> >+<script src="../../resources/js-test-pre.js"></script> >+</head> >+<body id="body"> >+ >+<form> >+ <fieldset aria-describedby="hint"> >+ <span id="hint">Some hint</span> >+ <input id="yes" type="radio" value="yes" > >+ <label for="yes">Yes</label> >+ <input id="no" type="radio" value="no"> >+ <label for="no">No</label> >+ </fieldset> >+ </form> >+ >+<p id="description"></p> >+<div id="console"></div> >+ >+<script> >+ >+ description("This tests form controls use their fieldset parent's description as AXHelp."); >+ >+ if (window.accessibilityController) { >+ >+ var yesRadio = accessibilityController.accessibleElementById("yes"); >+ var noRadio = accessibilityController.accessibleElementById("no"); >+ shouldBe("yesRadio.helpText", "'AXHelp: Some hint'"); >+ shouldBe("noRadio.helpText", "'AXHelp: Some hint'"); >+ } >+ >+</script> >+ >+<script src="../../resources/js-test-post.js"></script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185246
:
339403
|
341621
|
341627
|
341628