WebKit Bugzilla
Attachment 360261 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-20190126195037.patch (text/plain), 6.96 KB, created by
Eric Liang
on 2019-01-26 19:50:38 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eric Liang
Created:
2019-01-26 19:50:38 PST
Size:
6.96 KB
patch
obsolete
>Subversion Revision: 240344 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6c5b00f9a12f147c8f77e731164a039c4528f661..4945314896e43a88b8707e49ed670fe58d451175 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-01-26 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-23 Wenson Hsieh <wenson_hsieh@apple.com> > > Introduce UndoStep::label() and adopt it in WebKitLegacy and WebKit >diff --git a/Source/WebCore/accessibility/AccessibilityMenuList.cpp b/Source/WebCore/accessibility/AccessibilityMenuList.cpp >index 6de86730e6a3e5ce0fb50f0ec1f6a0fbbb52ba9f..f6a5a12c543edb30371bc17aae74bb48e3c2881a 100644 >--- a/Source/WebCore/accessibility/AccessibilityMenuList.cpp >+++ b/Source/WebCore/accessibility/AccessibilityMenuList.cpp >@@ -45,6 +45,11 @@ Ref<AccessibilityMenuList> AccessibilityMenuList::create(RenderMenuList* rendere > bool AccessibilityMenuList::press() > { > #if !PLATFORM(IOS_FAMILY) >+ Element* element = this->element(); >+ if (!element) >+ return false; >+ if (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..3f34f3bd3affca001a698b6e9d3824058f094eb9 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 find an accessible node by its element id. >+ if ([attributeName isEqualToString:@"AXDRTCollaspedAttribute"]) >+ return [NSNumber numberWithBool:m_object->isCollapsed()]; >+ > if ([attributeName isEqualToString:@"AXAutocompleteValue"]) > return m_object->autoCompleteValue(); > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 0181576f8c1758698f19f23a870ae7ef3b65b8e3..47a609a07b3357398adf05af2878264943729900 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2019-01-26 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. >+ > 2019-01-23 Eric Liang <ericliang@apple.com> > > AX: [GTK] Layout test accessibility/set-selected-editable.html is failing >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..f02cf78f0101924559363105b54c9dce7a2344b1 >--- /dev/null >+++ b/LayoutTests/accessibility/press-not-work-for-disabled-menu-list-expected.txt >@@ -0,0 +1,14 @@ >+ >+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('AXDRTCollaspedAttribute') is true >+PASS checkedElement.boolAttributeValue('AXDRTCollaspedAttribute') is true >+PASS pressedElement.boolAttributeValue('AXDRTCollaspedAttribute') is true >+PASS checkedElement.boolAttributeValue('AXDRTCollaspedAttribute') 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..00cd7b6752a921fb344a0f4071e03f5c4ceaa31b >--- /dev/null >+++ b/LayoutTests/accessibility/press-not-work-for-disabled-menu-list.html >@@ -0,0 +1,88 @@ >+<!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="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."); >+ >+ //Dont have tests for 'enabled' controls because when menu list opens a popup, it hangs on LayoutTests. >+ var pressedElement, checkedElement; >+ var numOfTest = 2; >+ >+ if (window.accessibilityController) { >+ jsTestIsAsync = true; >+ >+ var pressNum = 1, checkNum = 1; >+ >+ setTimeout(function() { >+ pressNext(); >+ }, 0); >+ setTimeout(function() { >+ checkNext(); >+ }, 10); >+ } >+ >+ function pressNext() >+ { >+ if (pressNum > numOfTest) >+ { >+ return; >+ } >+ document.getElementById("test" + pressNum).focus(); >+ pressedElement = accessibilityController.accessibleElementById("test" + pressNum); >+ shouldBeTrue("pressedElement.boolAttributeValue('AXDRTCollaspedAttribute')"); >+ pressedElement.press(); >+ setTimeout(function() >+ { >+ pressNum = pressNum + 1; >+ pressNext(); >+ }, 20); >+ } >+ >+ function checkNext() >+ { >+ if (checkNum > numOfTest) >+ { >+ finishJSTest(); >+ return; >+ } >+ checkedElement = accessibilityController.accessibleElementById("test" + checkNum); >+ shouldBeTrue("checkedElement.boolAttributeValue('AXDRTCollaspedAttribute')"); >+ setTimeout(function() >+ { >+ checkNum = checkNum + 1; >+ checkNext(); >+ }, 20); >+ } >+ >+</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 193878
:
360261
|
360266
|
360277
|
360278
|
360279
|
360284
|
360285
|
360286
|
360439
|
360886
|
360903
|
360930
|
360936
|
360939
|
360942
|
361067
|
361070