WebKit Bugzilla
Attachment 340202 Details for
Bug 185219
: AX: In role=dialog elements with aria-modal=true VoiceOver iOS/macOS can't manually focus or read dialog paragraph description text inside the modal.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
patch.txt (text/plain), 5.32 KB, created by
Nan Wang
on 2018-05-11 10:54:08 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Nan Wang
Created:
2018-05-11 10:54:08 PDT
Size:
5.32 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 231707) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2018-05-11 Nan Wang <n_wang@apple.com> >+ >+ AX: In role=dialog elements with aria-modal=true VoiceOver iOS/macOS can't manually focus or read dialog paragraph description text inside the modal. >+ https://bugs.webkit.org/show_bug.cgi?id=185219 >+ <rdar://problem/39920009> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The text node descendants of a modal dialog are ignored. Fixed it by using AccessibilityObject's >+ node() to determine if it's the descendant of the modal dialog node. >+ >+ Test: accessibility/aria-modal-text-descendants.html >+ >+ * accessibility/AccessibilityObject.cpp: >+ (WebCore::AccessibilityObject::isModalDescendant const): >+ > 2018-05-11 Brady Eidson <beidson@apple.com> > > Make sure history navigations reuse the existing process when necessary. >Index: Source/WebCore/accessibility/AccessibilityObject.cpp >=================================================================== >--- Source/WebCore/accessibility/AccessibilityObject.cpp (revision 231659) >+++ Source/WebCore/accessibility/AccessibilityObject.cpp (working copy) >@@ -2088,19 +2088,16 @@ String AccessibilityObject::currentValue > > bool AccessibilityObject::isModalDescendant(Node* modalNode) const > { >- if (!modalNode || !this->element()) >+ Node *node = this->node(); >+ if (!modalNode || !node) > return false; > >- if (this->element() == modalNode) >+ if (node == modalNode) > return true; > > // ARIA 1.1 aria-modal, indicates whether an element is modal when displayed. > // For the decendants of the modal object, they should also be considered as aria-modal=true. >- for (auto& ancestor : elementAncestors(this->element())) { >- if (&ancestor == modalNode) >- return true; >- } >- return false; >+ return node->isDescendantOf(*modalNode); > } > > bool AccessibilityObject::isModalNode() const >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 231659) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2018-05-11 Nan Wang <n_wang@apple.com> >+ >+ AX: In role=dialog elements with aria-modal=true VoiceOver iOS/macOS can't manually focus or read dialog paragraph description text inside the modal. >+ https://bugs.webkit.org/show_bug.cgi?id=185219 >+ <rdar://problem/39920009> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * accessibility/aria-modal-text-descendants-expected.txt: Added. >+ * accessibility/aria-modal-text-descendants.html: Added. >+ > 2018-05-10 Matt Baker <mattbaker@apple.com> > > Web Inspector: ASSERT_NOT_REACHED in PageDebuggerAgent::didAddEventListener when page adds attribute event listener >Index: LayoutTests/accessibility/aria-modal-text-descendants-expected.txt >=================================================================== >--- LayoutTests/accessibility/aria-modal-text-descendants-expected.txt (nonexistent) >+++ LayoutTests/accessibility/aria-modal-text-descendants-expected.txt (working copy) >@@ -0,0 +1,17 @@ >+This tests text descendants of modal dialog are accessible. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS backgroundAccessible() is false >+PASS text.isIgnored is false >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+Other page content with a dummy focusable element >+ >+Display a dialog >+ >+Just an example. >+ >+text >Index: LayoutTests/accessibility/aria-modal-text-descendants.html >=================================================================== >--- LayoutTests/accessibility/aria-modal-text-descendants.html (nonexistent) >+++ LayoutTests/accessibility/aria-modal-text-descendants.html (working copy) >@@ -0,0 +1,49 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+<head> >+<script src="../resources/js-test-pre.js"></script> >+</head> >+ >+<body id="body"> >+ >+<div id="bg"> >+<p id="bgContent">Other page content with <a href="#">a dummy focusable element</a></p> >+<p><a href="#" role="button" id="displayBtn">Display a dialog</a></p> >+</div> >+ >+<div role="dialog" aria-modal="true" aria-labelledby="myDialog" id="box" class="box-hidden" tabindex="-1"> >+ <h3 id="myDialog">Just an example.</h3> >+ <p id="text">text</p> >+</div> >+ >+ >+<script> >+ >+ description("This tests text descendants of modal dialog are accessible."); >+ >+ if (window.accessibilityController) { >+ // Background should be unaccessible after loading, since the >+ // dialog is displayed and aria-modal=true. >+ shouldBeFalse("backgroundAccessible()"); >+ >+ var text = accessibilityController.accessibleElementById("text").childAtIndex(0); >+ shouldBeFalse("text.isIgnored"); >+ } >+ >+ function backgroundAccessible() { >+ var displayBtn = accessibilityController.accessibleElementById("displayBtn"); >+ var bgContent = accessibilityController.accessibleElementById("bgContent"); >+ >+ if (!displayBtn || !bgContent) >+ return false; >+ >+ return !displayBtn.isIgnored && !bgContent.isIgnored; >+ } >+ >+ >+</script> >+ >+ >+<script src="../resources/js-test-post.js"></script> >+</body> >+</html> >\ No newline at end of file
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 185219
:
339346
|
340202
|
340203