WebKit Bugzilla
Attachment 360279 Details for
Bug 193878
: AX: VoiceOver allows to interact with a disabled <select> element
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193878-20190127004535.patch (text/plain), 8.25 KB, created by
Eric Liang
on 2019-01-27 00:45:36 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eric Liang
Created:
2019-01-27 00:45:36 PST
Size:
8.25 KB
patch
obsolete
>Subversion Revision: 240551 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index aaa113994d607050cafb0e90b26bcb69e95e3225..613129fbc3feab61f4d0d1446b931b8a1becb6b9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-01-27 Eric Liang <ericliang@apple.com> >+ >+ When receiving AXPress actions, check that the form control is enabled for menu list. >+ https://bugs.webkit.org/show_bug.cgi?id=193878 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: accessibility/press-not-work-for-disabled-menu-list.html >+ >+ * accessibility/AccessibilityMenuList.cpp: >+ (WebCore::AccessibilityMenuList::press): >+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: >+ (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): >+ > 2019-01-26 Simon Fraser <simon.fraser@apple.com> > > Allow scrolling tree nodes to exist in a detached state >diff --git a/Source/WebCore/accessibility/AccessibilityMenuList.cpp b/Source/WebCore/accessibility/AccessibilityMenuList.cpp >index 6de86730e6a3e5ce0fb50f0ec1f6a0fbbb52ba9f..84469cd8fa59c23cf4a674f502e1016d885dadcf 100644 >--- a/Source/WebCore/accessibility/AccessibilityMenuList.cpp >+++ b/Source/WebCore/accessibility/AccessibilityMenuList.cpp >@@ -45,6 +45,9 @@ Ref<AccessibilityMenuList> AccessibilityMenuList::create(RenderMenuList* rendere > bool AccessibilityMenuList::press() > { > #if !PLATFORM(IOS_FAMILY) >+ auto element = this->element(); >+ if (!element || element->isDisabledFormControl()) >+ return false; > RenderMenuList* menuList = static_cast<RenderMenuList*>(renderer()); > if (menuList->popupIsVisible()) > menuList->hidePopup(); >diff --git a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >index 370597f2c00c19855b04dd1de6bab28a1dc35e63..656fde0db5715150e079db517dac8a1d34a675b4 100644 >--- a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >+++ b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >@@ -3157,6 +3157,10 @@ IGNORE_WARNINGS_END > if ([attributeName isEqualToString:@"AXDRTElementIdAttribute"]) > return m_object->getAttribute(idAttr); > >+ // Used by DRT to get check if certain popup is collapsed and hidden. >+ if ([attributeName isEqualToString:@"AXDRTCollapsedAttribute"]) >+ return [NSNumber numberWithBool:m_object->isCollapsed()]; >+ > if ([attributeName isEqualToString:@"AXAutocompleteValue"]) > return m_object->autoCompleteValue(); > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e2996664a14d7f60c774e7e56c5389af25f5db55..37579028c72ddece8150934bad12cb83459c8e9c 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-01-27 Eric Liang <ericliang@apple.com> >+ >+ Make sure that isCollapsed attribute on disabled menu list is true after AXPressed event. >+ https://bugs.webkit.org/show_bug.cgi?id=193878 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * accessibility/press-not-work-for-disabled-menu-list-expected.txt: Added. >+ * accessibility/press-not-work-for-disabled-menu-list.html: Added. >+ * platform/win/TestExpectations: >+ > 2019-01-26 Devin Rousso <drousso@apple.com> > > Web Inspector: handle CSS Color 4 color syntaxes >diff --git a/LayoutTests/accessibility/press-not-work-for-disabled-menu-list-expected.txt b/LayoutTests/accessibility/press-not-work-for-disabled-menu-list-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..526bcc0a0f3209c6c1db31e8e61545fd1d4cff45 >--- /dev/null >+++ b/LayoutTests/accessibility/press-not-work-for-disabled-menu-list-expected.txt >@@ -0,0 +1,15 @@ >+ >+This tests that menu lists that are disabled will not be triggered by AXPress actions. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS pressedElement.boolAttributeValue('AXDRTCollapsedAttribute') is true >+PASS checkedElement.boolAttributeValue('AXDRTCollapsedAttribute') is true >+PASS pressedElement.boolAttributeValue('AXDRTCollapsedAttribute') is true >+PASS checkedElement.boolAttributeValue('AXDRTCollapsedAttribute') is true >+PASS pressedElement.boolAttributeValue('AXDRTCollapsedAttribute') is true >+PASS checkedElement.boolAttributeValue('AXDRTCollapsedAttribute') is true >+PASS successfullyParsed is true >+ >+TEST COMPLETE >diff --git a/LayoutTests/accessibility/press-not-work-for-disabled-menu-list.html b/LayoutTests/accessibility/press-not-work-for-disabled-menu-list.html >new file mode 100644 >index 0000000000000000000000000000000000000000..109c7d87be837a28396c5c262fcdd4691a3386dd >--- /dev/null >+++ b/LayoutTests/accessibility/press-not-work-for-disabled-menu-list.html >@@ -0,0 +1,91 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+<head> >+<script src="../resources/js-test-pre.js"></script> >+</head> >+<body id="body"> >+<div id="content"> >+ >+<select id="test1" disabled> >+ <option value="1">Cork</option> >+ <option value="2">Cupertino</option> >+ <option value="3">London</option> >+ <option value="4">New York</option> >+ <option value="5">Singapore</option> >+ <option value="6">Tokyo</option> >+</select> >+ >+<select id="test2" disabled aria-disabled="false"> >+ <option value="1">Cork</option> >+ <option value="2">Cupertino</option> >+ <option value="3">London</option> >+ <option value="4">New York</option> >+ <option value="5">Singapore</option> >+ <option value="6">Tokyo</option> >+</select> >+ >+<select id="test3" disabled aria-disabled="true"> >+ <option value="1">Cork</option> >+ <option value="2">Cupertino</option> >+ <option value="3">London</option> >+ <option value="4">New York</option> >+ <option value="5">Singapore</option> >+ <option value="6">Tokyo</option> >+</select> >+ >+<p id="description"></p> >+<div id="console"></div> >+ >+</div> >+ >+<script> >+ description("This tests that menu lists that are disabled will not be triggered by AXPress actions."); >+ >+ // We don't test for enabled controls because opening menu lists waits on the UI process to display the menu. >+ var pressedElement, checkedElement; >+ var numOfTests = 3; >+ >+ if (window.accessibilityController) { >+ jsTestIsAsync = true; >+ var pressNum = 1, checkNum = 1; >+ setTimeout(function() { >+ pressNext(); >+ }, 0); >+ setTimeout(function() { >+ checkNext(); >+ }, 9); >+ } >+ >+ function pressNext() { >+ if (pressNum > numOfTests) { >+ return; >+ } >+ document.getElementById("test" + pressNum).focus(); >+ pressedElement = accessibilityController.accessibleElementById("test" + pressNum); >+ // Checks isCollapsed is true before starting the AXPress. >+ shouldBeTrue("pressedElement.boolAttributeValue('AXDRTCollapsedAttribute')"); >+ pressedElement.press(); >+ setTimeout(function() { >+ pressNum = pressNum + 1; >+ pressNext(); >+ }, 10); >+ } >+ >+ function checkNext() { >+ if (checkNum > numOfTests) { >+ finishJSTest(); >+ return; >+ } >+ checkedElement = accessibilityController.accessibleElementById("test" + checkNum); >+ // Checks isCollapsed is true after starting the AXPress. >+ shouldBeTrue("checkedElement.boolAttributeValue('AXDRTCollapsedAttribute')"); >+ setTimeout(function() { >+ checkNum = checkNum + 1; >+ checkNext(); >+ }, 10); >+ } >+</script> >+ >+<script src="../resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/platform/win/TestExpectations b/LayoutTests/platform/win/TestExpectations >index 3230bf0469a649e9fad7767ce2b6152db4f528ee..b15825cfb74d48ef1b36384b2cb6c01c1f5eb6ae 100644 >--- a/LayoutTests/platform/win/TestExpectations >+++ b/LayoutTests/platform/win/TestExpectations >@@ -3163,6 +3163,7 @@ accessibility/w3c-svg-description-calculation.html [ Failure ] > accessibility/w3c-svg-name-calculation.html [ Failure ] > accessibility/w3c-svg-roles.html [ Failure ] > accessibility/svg-element-with-aria-role.html [ Failure ] >+accessibility/press-not-work-for-disabled-menu-list.html [ Skip ] > accessibility/win/select-element-valuechange-event.html [ Failure ] > css1/box_properties/float_on_text_elements.html [ Failure ] > css1/units/length_units.html [ Failure ]
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 193878
:
360261
|
360266
|
360277
|
360278
|
360279
|
360284
|
360285
|
360286
|
360439
|
360886
|
360903
|
360930
|
360936
|
360939
|
360942
|
361067
|
361070