WebKit Bugzilla
Attachment 372927 Details for
Bug 199216
: Enhance support of aria-haspopup per ARIA 1.1 specification.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199216-20190626114149.patch (text/plain), 23.08 KB, created by
Andres Gonzalez
on 2019-06-26 08:41:50 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Andres Gonzalez
Created:
2019-06-26 08:41:50 PDT
Size:
23.08 KB
patch
obsolete
>Subversion Revision: 246793 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 704f598299e11482f5d1b3128e2bceebc42ab192..3c76f8fa49e7f19c7f10c7cebb7a3fa481573e05 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,27 @@ >+2019-06-25 Andres Gonzalez <andresg_22@apple.com> >+ >+ Enhance support of aria-haspopup per ARIA 1.1 specification. >+ https://bugs.webkit.org/show_bug.cgi?id=199216 >+ <rdar://problem/46221342> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test button-with-aria-haspopup-role.html was expanded to cover testing >+ of new functionality. >+ >+ * accessibility/AccessibilityObject.cpp: >+ (WebCore::AccessibilityObject::popupValue const): replaces hasPopupValue. >+ (WebCore::AccessibilityObject::hasPopupValue const): Deleted. >+ * accessibility/AccessibilityObject.h: >+ * accessibility/AccessibilityRenderObject.cpp: >+ (WebCore::AccessibilityRenderObject::hasPopup const): method rename. >+ * accessibility/atk/WebKitAccessible.cpp: >+ (webkitAccessibleGetAttributes): method rename. >+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: >+ (-[WebAccessibilityObjectWrapper accessibilityPopupValue]): >+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: >+ (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): >+ > 2019-06-25 Michael Catanzaro <mcatanzaro@igalia.com> > > Add user agent quirk for bankofamerica.com >diff --git a/Source/WebCore/accessibility/AccessibilityObject.cpp b/Source/WebCore/accessibility/AccessibilityObject.cpp >index 0b33d28c61bb44b90e557410c66e12dc52863832..6a9c4d45bc66b0ae41d3551f8b6418b3a81dabe4 100644 >--- a/Source/WebCore/accessibility/AccessibilityObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp >@@ -2758,16 +2758,20 @@ bool AccessibilityObject::supportsHasPopup() const > return hasAttribute(aria_haspopupAttr) || isComboBox(); > } > >-String AccessibilityObject::hasPopupValue() const >+String AccessibilityObject::popupValue() const > { > const AtomString& hasPopup = getAttribute(aria_haspopupAttr); > if (equalLettersIgnoringASCIICase(hasPopup, "true") >- || equalLettersIgnoringASCIICase(hasPopup, "dialog") >- || equalLettersIgnoringASCIICase(hasPopup, "grid") >- || equalLettersIgnoringASCIICase(hasPopup, "listbox") >- || equalLettersIgnoringASCIICase(hasPopup, "menu") >- || equalLettersIgnoringASCIICase(hasPopup, "tree")) >- return hasPopup; >+ || equalLettersIgnoringASCIICase(hasPopup, "menu")) >+ return "menu"; >+ if (equalLettersIgnoringASCIICase(hasPopup, "dialog")) >+ return "dialog"; >+ if (equalLettersIgnoringASCIICase(hasPopup, "grid")) >+ return "grid"; >+ if (equalLettersIgnoringASCIICase(hasPopup, "listbox")) >+ return "listbox"; >+ if (equalLettersIgnoringASCIICase(hasPopup, "tree")) >+ return "tree"; > > // In ARIA 1.1, the implicit value for combobox became "listbox." > if (isComboBox() && hasPopup.isEmpty()) >diff --git a/Source/WebCore/accessibility/AccessibilityObject.h b/Source/WebCore/accessibility/AccessibilityObject.h >index b59b7d5b635967fd0fa192a59660a4eb342eb718..7b763c7fa2050ac3d9ce9b8d89ba86640f6613f8 100644 >--- a/Source/WebCore/accessibility/AccessibilityObject.h >+++ b/Source/WebCore/accessibility/AccessibilityObject.h >@@ -552,7 +552,7 @@ public: > void ariaOwnsReferencingElements(AccessibilityChildrenVector&) const; > > virtual bool hasPopup() const { return false; } >- String hasPopupValue() const; >+ String popupValue() const; > bool supportsHasPopup() const; > bool pressedIsPresent() const; > bool ariaIsMultiline() const; >diff --git a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >index 85f6e2f21b1e3eca47cf59fff4ad0441bf35dc58..05af02515103f1f20612c26d2558575fb5de6506 100644 >--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >@@ -1034,8 +1034,8 @@ bool AccessibilityRenderObject::hasPopup() const > { > // Return true if this has the aria-haspopup attribute, or if it has an ancestor of type link with the aria-haspopup attribute. > return AccessibilityObject::matchedParent(*this, true, [this] (const AccessibilityObject& object) { >- return (this == &object) ? !equalLettersIgnoringASCIICase(object.hasPopupValue(), "false") >- : object.isLink() && !equalLettersIgnoringASCIICase(object.hasPopupValue(), "false"); >+ return (this == &object) ? !equalLettersIgnoringASCIICase(object.popupValue(), "false") >+ : object.isLink() && !equalLettersIgnoringASCIICase(object.popupValue(), "false"); > }); > } > >diff --git a/Source/WebCore/accessibility/atk/WebKitAccessible.cpp b/Source/WebCore/accessibility/atk/WebKitAccessible.cpp >index f47efc52f7656dd2081a4f76c2bc6b5d2fa6394f..5c8f60ceeff5a39ecdbbf7e04859070ee17680cd 100644 >--- a/Source/WebCore/accessibility/atk/WebKitAccessible.cpp >+++ b/Source/WebCore/accessibility/atk/WebKitAccessible.cpp >@@ -467,7 +467,7 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object) > attributeSet = addToAtkAttributeSet(attributeSet, "autocomplete", coreObject->autoCompleteValue().utf8().data()); > > if (coreObject->supportsHasPopup()) >- attributeSet = addToAtkAttributeSet(attributeSet, "haspopup", coreObject->hasPopupValue().utf8().data()); >+ attributeSet = addToAtkAttributeSet(attributeSet, "haspopup", coreObject->popupValue().utf8().data()); > > if (coreObject->supportsCurrent()) > attributeSet = addToAtkAttributeSet(attributeSet, "current", coreObject->currentValue().utf8().data()); >diff --git a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm b/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm >index 25f524bc0d96f08899a301929ede3e51ae37743e..9f79b61720958e3bb72d85552eac01b71ad5527c 100644 >--- a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm >+++ b/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm >@@ -503,6 +503,14 @@ - (BOOL)accessibilityHasPopup > return m_object->hasPopup(); > } > >+- (NSString *)accessibilityPopupValue >+{ >+ if (![self _prepareAccessibilityCall]) >+ return nil; >+ >+ return m_object->popupValue(); >+} >+ > - (NSString *)accessibilityLanguage > { > if (![self _prepareAccessibilityCall]) >diff --git a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >index f43203834bf60b8711ee2d0a1dac202bdf3b470e..666940bbede0dccba60b6c656a3c47071e3de9a5 100644 >--- a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >+++ b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >@@ -237,6 +237,10 @@ using namespace HTMLNames; > #define NSAccessibilityHasPopupAttribute @"AXHasPopup" > #endif > >+#ifndef NSAccessibilityPopupValueAttribute >+#define NSAccessibilityPopupValueAttribute @"AXPopupValue" >+#endif >+ > #ifndef NSAccessibilityPlaceholderValueAttribute > #define NSAccessibilityPlaceholderValueAttribute @"AXPlaceholderValue" > #endif >@@ -3379,10 +3383,10 @@ IGNORE_WARNINGS_END > > if ([attributeName isEqualToString:@"AXAutocompleteValue"]) > return m_object->autoCompleteValue(); >- >- if ([attributeName isEqualToString:@"AXHasPopUpValue"]) >- return m_object->hasPopupValue(); >- >+ >+ if ([attributeName isEqualToString:NSAccessibilityPopupValueAttribute]) >+ return m_object->popupValue(); >+ > if ([attributeName isEqualToString:@"AXKeyShortcutsValue"]) > return m_object->keyShortcutsValue(); > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 8dd1f5f192dd634adb5fdbdef5dcd8d4131aef0c..f081545edb10793e7e120fd1b5b10f5fd4ebd038 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,35 @@ >+2019-06-26 Andres Gonzalez <andresg_22@apple.com> >+ >+ Enhance support of aria-haspopup per ARIA 1.1 specification. >+ https://bugs.webkit.org/show_bug.cgi?id=199216 >+ <rdar://problem/46221342> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Fix for test with DumpRenderTree. >+ >+ * DumpRenderTree/AccessibilityUIElement.cpp: >+ (getPopupValueCallback): >+ (AccessibilityUIElement::getJSClass): >+ * DumpRenderTree/AccessibilityUIElement.h: >+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm: >+ (AccessibilityUIElement::popupValue const): >+ >+2019-06-25 Andres Gonzalez <andresg_22@apple.com> >+ >+ Enhance support of aria-haspopup per ARIA 1.1 specification. >+ https://bugs.webkit.org/show_bug.cgi?id=199216 >+ <rdar://problem/46221342> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: >+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: >+ * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: >+ (WTR::AccessibilityUIElement::popupValue const): >+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: >+ (WTR::AccessibilityUIElement::popupValue const): >+ > 2019-06-25 Aakash Jain <aakash_jain@apple.com> > > [ews-build] UploadTestResults and ExtractTestResults clobber results in case of multiple layout test runs in a build >diff --git a/Tools/DumpRenderTree/AccessibilityUIElement.cpp b/Tools/DumpRenderTree/AccessibilityUIElement.cpp >index 1159cd6d41539aa145e36c65cc5a8e6b9af60d5f..6b8736e37fbe6ca595fa74dbdc277bdb53d27281 100644 >--- a/Tools/DumpRenderTree/AccessibilityUIElement.cpp >+++ b/Tools/DumpRenderTree/AccessibilityUIElement.cpp >@@ -1403,6 +1403,11 @@ static JSValueRef getHasPopupCallback(JSContextRef context, JSObjectRef thisObje > return JSValueMakeBoolean(context, toAXElement(thisObject)->hasPopup()); > } > >+static JSValueRef getPopupValueCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*) >+{ >+ return JSValueMakeString(context, toAXElement(thisObject)->popupValue().get()); >+} >+ > static JSValueRef hierarchicalLevelCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*) > { > return JSValueMakeNumber(context, toAXElement(thisObject)->hierarchicalLevel()); >@@ -1863,6 +1868,7 @@ JSClassRef AccessibilityUIElement::getJSClass() > { "isOffScreen", getIsOffScreenCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, > { "isCollapsed", getIsCollapsedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, > { "hasPopup", getHasPopupCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, >+ { "popupValue", getPopupValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, > { "valueDescription", getValueDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, > { "hierarchicalLevel", hierarchicalLevelCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, > { "documentEncoding", getDocumentEncodingCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, >diff --git a/Tools/DumpRenderTree/AccessibilityUIElement.h b/Tools/DumpRenderTree/AccessibilityUIElement.h >index 0e2a1d311dff10fef855eed663c0611c45467d4a..3ee21b68570718a0c3113c32bbaece1acabe4b1c 100644 >--- a/Tools/DumpRenderTree/AccessibilityUIElement.h >+++ b/Tools/DumpRenderTree/AccessibilityUIElement.h >@@ -164,6 +164,7 @@ public: > bool isMultiLine() const; > bool isIndeterminate() const; > bool hasPopup() const; >+ JSRetainPtr<JSStringRef> popupValue() const; > int hierarchicalLevel() const; > double clickPointX(); > double clickPointY(); >diff --git a/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm b/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm >index 8024657f23c26e73e8732e90c26993681810d0cf..93cfe7342b6d7d8ff74fc2e04642941b4703e802 100644 >--- a/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm >+++ b/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm >@@ -1626,6 +1626,17 @@ bool AccessibilityUIElement::hasPopup() const > return false; > } > >+JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const >+{ >+ BEGIN_AX_OBJC_EXCEPTIONS >+ id value = [m_element accessibilityAttributeValue:@"AXPopupValue"]; >+ if ([value isKindOfClass:[NSString class]]) >+ return [value createJSStringRef]; >+ END_AX_OBJC_EXCEPTIONS >+ >+ return [@"false" createJSStringRef]; >+} >+ > void AccessibilityUIElement::takeFocus() > { > BEGIN_AX_OBJC_EXCEPTIONS >diff --git a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h b/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h >index 69d3f51844276eee547e808b738caa756419574f..94c21a086d1b566b789bac686c9d6c461dd92951 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h >+++ b/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h >@@ -170,6 +170,7 @@ public: > bool isSingleLine() const; > bool isMultiLine() const; > bool hasPopup() const; >+ JSRetainPtr<JSStringRef> popupValue() const; > int hierarchicalLevel() const; > double clickPointX(); > double clickPointY(); >diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl >index e3531fbcb6bf9911c6ec877f26eeff5b46f59022..b60bf1787ddc6669e8c7a8bddee3e6377d49379f 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl >+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl >@@ -91,6 +91,7 @@ interface AccessibilityUIElement { > readonly attribute boolean isVisible; > readonly attribute boolean isCollapsed; > readonly attribute boolean hasPopup; >+ readonly attribute DOMString popupValue; > readonly attribute boolean isIgnored; > readonly attribute boolean isSingleLine; > readonly attribute boolean isMultiLine; >diff --git a/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm b/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm >index f34deed472cf6b22cc8b33f9c7d17fc9e8e837cb..27008070bf576b54406c674c574e0059d45f3165 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm >@@ -87,6 +87,7 @@ - (CGRect)accessibilityVisibleContentRect; > - (NSString *)accessibilityTextualContext; > - (NSString *)accessibilityRoleDescription; > - (BOOL)accessibilityHasPopup; >+- (NSString *)accessibilityPopupValue; > - (NSString *)accessibilityColorStringValue; > > // TextMarker related >@@ -1058,6 +1059,11 @@ bool AccessibilityUIElement::hasPopup() const > return [m_element accessibilityHasPopup]; > } > >+JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const >+{ >+ return [[m_element accessibilityPopupValue] createJSStringRef]; >+} >+ > void AccessibilityUIElement::takeFocus() > { > // FIXME: implement >diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm >index 6b2788e02cc68ba33914297fd235827796d5e112..8958b63befffdb70a5f2d5c1d48811c464905d1e 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm >@@ -1708,6 +1708,17 @@ bool AccessibilityUIElement::hasPopup() const > return false; > } > >+JSRetainPtr<JSStringRef> AccessibilityUIElement::popupValue() const >+{ >+ BEGIN_AX_OBJC_EXCEPTIONS >+ id value = [m_element accessibilityAttributeValue:@"AXPopupValue"]; >+ if ([value isKindOfClass:[NSString class]]) >+ return [value createJSStringRef]; >+ END_AX_OBJC_EXCEPTIONS >+ >+ return [@"false" createJSStringRef]; >+} >+ > void AccessibilityUIElement::takeFocus() > { > BEGIN_AX_OBJC_EXCEPTIONS >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 81a485538cb98518ebb8573c01eb8fd5a2152e79..b2a6fcd12f9883c2c5faa74fc1328c521f50a57f 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-25 Andres Gonzalez <andresg_22@apple.com> >+ >+ Enhance support of aria-haspopup per ARIA 1.1 specification. >+ https://bugs.webkit.org/show_bug.cgi?id=199216 >+ <rdar://problem/46221342> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * accessibility/button-with-aria-haspopup-role-expected.txt: >+ * accessibility/button-with-aria-haspopup-role.html: >+ * accessibility/ios-simulator/button-with-aria-haspopup-role-expected.txt: >+ * accessibility/ios-simulator/button-with-aria-haspopup-role.html: >+ > 2019-06-25 Fujii Hironori <Hironori.Fujii@sony.com> > > Unreviewed test gardening >diff --git a/LayoutTests/accessibility/button-with-aria-haspopup-role-expected.txt b/LayoutTests/accessibility/button-with-aria-haspopup-role-expected.txt >index 8b91b02071ac6178a86f0ae2cbb5c44cfed8a12e..ee799f2f500b54b11839b7a84e187aa2d695aaf1 100644 >--- a/LayoutTests/accessibility/button-with-aria-haspopup-role-expected.txt >+++ b/LayoutTests/accessibility/button-with-aria-haspopup-role-expected.txt >@@ -3,16 +3,26 @@ This tests the platform role exposed for buttons with aria-haspopup > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >-test1 AXRole: AXButton for aria-haspopup=(null) >-test2 AXRole: AXPopUpButton for aria-haspopup='true' >-test3 AXRole: AXButton for aria-haspopup='false' >-test4 AXRole: AXPopUpButton for aria-haspopup='dialog' >-test5 AXRole: AXPopUpButton for aria-haspopup='grid' >-test6 AXRole: AXPopUpButton for aria-haspopup='listbox' >-test7 AXRole: AXPopUpButton for aria-haspopup='menu' >-test8 AXRole: AXPopUpButton for aria-haspopup='tree' >-test9 AXRole: AXButton for aria-haspopup='foo' >-test10 AXRole: AXButton for aria-haspopup='' >+test1 AXRole: AXButton for aria-haspopup = (null) >+AX popupValue = 'false' >+test2 AXRole: AXPopUpButton for aria-haspopup = 'true' >+AX popupValue = 'menu' >+test3 AXRole: AXButton for aria-haspopup = 'false' >+AX popupValue = 'false' >+test4 AXRole: AXPopUpButton for aria-haspopup = 'dialog' >+AX popupValue = 'dialog' >+test5 AXRole: AXPopUpButton for aria-haspopup = 'grid' >+AX popupValue = 'grid' >+test6 AXRole: AXPopUpButton for aria-haspopup = 'listbox' >+AX popupValue = 'listbox' >+test7 AXRole: AXPopUpButton for aria-haspopup = 'menu' >+AX popupValue = 'menu' >+test8 AXRole: AXPopUpButton for aria-haspopup = 'tree' >+AX popupValue = 'tree' >+test9 AXRole: AXButton for aria-haspopup = 'foo' >+AX popupValue = 'false' >+test10 AXRole: AXButton for aria-haspopup = '' >+AX popupValue = 'false' > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/accessibility/button-with-aria-haspopup-role.html b/LayoutTests/accessibility/button-with-aria-haspopup-role.html >index 06ff97ea1ccefa17590127e791de8c90e1d0f4a9..abd8a026055edfc983e7b099e8a7b178f6501f99 100644 >--- a/LayoutTests/accessibility/button-with-aria-haspopup-role.html >+++ b/LayoutTests/accessibility/button-with-aria-haspopup-role.html >@@ -22,10 +22,12 @@ > description("This tests the platform role exposed for buttons with aria-haspopup"); > if (window.accessibilityController) { > for (var i = 1; i <= 10; i++) { >- var element = document.getElementById("test" + i) >+ var element = document.getElementById("test" + i) > var popup = element.hasAttribute("aria-haspopup") ? "'" + element.getAttribute("aria-haspopup") + "'" : "(null)"; > var axElement = accessibilityController.accessibleElementById("test" + i); >- debug("test" + i + " " + axElement.role + " for aria-haspopup=" + popup) >+ debug("test" + i + " " + axElement.role + " for aria-haspopup = " + popup) >+ // Check that accessibilityHasPopupValue returns the right value in each case. >+ debug("AX popupValue = " + "'" + axElement.popupValue + "'"); > } > > document.getElementById("content").style.visibility = "hidden"; >diff --git a/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role-expected.txt b/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role-expected.txt >index 409c859bc98eb37f53dcf9fcc96f8c95df1e50fc..4cc667b8d4b987c00f1872eaafccf7865792e17c 100644 >--- a/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role-expected.txt >+++ b/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role-expected.txt >@@ -4,15 +4,25 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > > PASS element.hasAttribute('aria-haspopup') is true >+AX popupValue = 'menu' > test1 has trait haspopup = true with aria-haspopup attribute = dialog >+AX popupValue = 'dialog' > test2 has trait haspopup = true with aria-haspopup attribute = grid >+AX popupValue = 'grid' > test3 has trait haspopup = true with aria-haspopup attribute = listbox >+AX popupValue = 'listbox' > test4 has trait haspopup = true with aria-haspopup attribute = menu >+AX popupValue = 'menu' > test5 has trait haspopup = true with aria-haspopup attribute = tree >+AX popupValue = 'tree' > test6 has trait haspopup = false with aria-haspopup attribute = null >+AX popupValue = 'false' > test7 has trait haspopup = false with aria-haspopup attribute = false >+AX popupValue = 'false' > test8 has trait haspopup = false with aria-haspopup attribute = foo >+AX popupValue = 'false' > test9 has trait haspopup = false with aria-haspopup attribute = >+AX popupValue = 'false' > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role.html b/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role.html >index 3da94b3a6ac51c13c6ed93bc854da7a6a5d7eb5c..82f1bd4d8f41c5c4ee82facabf7bfe0463262213 100644 >--- a/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role.html >+++ b/LayoutTests/accessibility/ios-simulator/button-with-aria-haspopup-role.html >@@ -21,11 +21,13 @@ > <script> > description("This tests the platform attributes exposed for buttons with aria-haspopup"); > if (window.accessibilityController) { >- // Get the document and accessibility elements for test0 to be used as reference. >+ // Get the document and accessibility elements for test0 to be used as reference to check traits against. > var element = document.getElementById("test0"); > shouldBe("element.hasAttribute('aria-haspopup')", "true"); > var axElement = accessibilityController.accessibleElementById("test0"); > var haspopupTraits = axElement.traits; >+ // Check that accessibilityHasPopupValue returns the right value in each case. >+ debug("AX popupValue = " + "'" + axElement.popupValue + "'"); > > for (var i = 1; i <= 9; i++) { > var element = document.getElementById("test" + i); >@@ -33,6 +35,8 @@ > var axElement = accessibilityController.accessibleElementById("test" + i); > var sameTraits = axElement.traits == haspopupTraits; > debug("test" + i + " has trait haspopup = " + sameTraits + " with aria-haspopup attribute = " + popup); >+ // Check that accessibilityHasPopupValue returns the right value in each case. >+ debug("AX popupValue = " + "'" + axElement.popupValue + "'"); > } > > document.getElementById("content").style.visibility = "hidden";
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 199216
:
372892
|
372895
|
372899
|
372927
|
372997
|
373032
|
373193
|
373197
|
373300
|
373325