Changeset 246715 in webkit
- Timestamp:
- Jun 22, 2019 11:59:18 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246707 r246715 1 2019-06-22 Andres Gonzalez <andresg_22@apple.com> 2 3 Accessibility objects contained in links should honor the aria-haspopup attribute in the ancestor link. 4 https://bugs.webkit.org/show_bug.cgi?id=199107 5 <rdar://problem/43663611> 6 7 Reviewed by Chris Fleizach. 8 9 * accessibility/element-haspopup-expected.txt: 10 * accessibility/element-haspopup.html: Added cases for a <p> element contained within <a>. 11 * accessibility/ios-simulator/button-with-aria-haspopup-role-expected.txt: Added. 12 * accessibility/ios-simulator/button-with-aria-haspopup-role.html: Added. Existed for MacOS and now also for iOS. 13 * accessibility/ios-simulator/element-haspopup-expected.txt: Copied from LayoutTests/accessibility/element-haspopup-expected.txt. 14 * accessibility/ios-simulator/element-haspopup.html: Added. 15 1 16 2019-06-21 Sihui Liu <sihui_liu@apple.com> 2 17 -
trunk/LayoutTests/accessibility/element-haspopup-expected.txt
r152716 r246715 1 1 Link 1 Link 2 2 Paragraph 1. 3 4 Paragraph 2. 5 6 Paragraph 3. 7 2 8 This tests that an element will report that it has a popup correctly. 3 9 … … 7 13 PASS accessibilityController.focusedElement.hasPopup is true 8 14 PASS accessibilityController.focusedElement.hasPopup is false 15 PASS p1.hasPopup is true 16 PASS p2.hasPopup is false 17 PASS p3.hasPopup is false 9 18 PASS successfullyParsed is true 10 19 -
trunk/LayoutTests/accessibility/element-haspopup.html
r155274 r246715 9 9 <a href="#" aria-haspopup="false" tabindex="0" id="link2">Link 2</a> 10 10 11 <a href="#" aria-haspopup="true" tabindex="0" id="link3"> 12 <p id="paragraph1">Paragraph 1.</p> 13 </a> 14 15 <a href="#" aria-haspopup="false" tabindex="0" id="link4"> 16 <p id="paragraph2">Paragraph 2.</p> 17 </a> 18 19 <a href="#" tabindex="0" id="link5"> 20 <p id="paragraph3">Paragraph 3.</p> 21 </a> 22 11 23 <p id="description"></p> 12 24 <div id="console"></div> 13 25 14 26 <script> 15 16 27 description("This tests that an element will report that it has a popup correctly."); 17 28 18 29 if (window.accessibilityController) { 19 20 30 document.getElementById("link1").focus(); 21 31 shouldBe("accessibilityController.focusedElement.hasPopup", "true"); … … 23 33 document.getElementById("link2").focus(); 24 34 shouldBe("accessibilityController.focusedElement.hasPopup", "false"); 35 36 var p1 = accessibilityController.accessibleElementById("paragraph1"); 37 shouldBe("p1.hasPopup", "true"); 38 39 var p2 = accessibilityController.accessibleElementById("paragraph2"); 40 shouldBe("p2.hasPopup", "false"); 41 42 var p3 = accessibilityController.accessibleElementById("paragraph3"); 43 shouldBe("p3.hasPopup", "false"); 25 44 } 26 45 -
trunk/LayoutTests/accessibility/ios-simulator/element-haspopup-expected.txt
r246714 r246715 1 1 Link 1 Link 2 2 Paragraph 1. 3 4 Paragraph 2. 5 6 Paragraph 3. 7 2 8 This tests that an element will report that it has a popup correctly. 3 9 … … 7 13 PASS accessibilityController.focusedElement.hasPopup is true 8 14 PASS accessibilityController.focusedElement.hasPopup is false 15 PASS p1.hasPopup is true 16 PASS p2.hasPopup is false 17 PASS p3.hasPopup is false 9 18 PASS successfullyParsed is true 10 19 -
trunk/Source/WebCore/ChangeLog
r246714 r246715 1 2019-06-22 Andres Gonzalez <andresg_22@apple.com> 2 3 Accessibility objects contained in links should honor the aria-haspopup attribute in the ancestor link. 4 https://bugs.webkit.org/show_bug.cgi?id=199107 5 <rdar://problem/43663611> 6 7 Reviewed by Chris Fleizach. 8 9 Tests: accessibility/ios-simulator/button-with-aria-haspopup-role.html 10 accessibility/ios-simulator/element-haspopup.html 11 12 If an accessibility object is contained within an <a>, we should check 13 the aria-haspopup attribute on the ancestor <a> element. This was done 14 before in the iOS WebKit accessibility bunddle override. 15 * accessibility/AccessibilityRenderObject.cpp: 16 (WebCore::AccessibilityRenderObject::hasPopup const): 17 1 18 2019-06-22 Robin Morisset <rmorisset@apple.com> and Yusuke Suzuki <ysuzuki@apple.com> 2 19 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r246490 r246715 1030 1030 return ariaAccessibilityDescription().length(); 1031 1031 } 1032 1032 1033 1033 bool AccessibilityRenderObject::hasPopup() const 1034 1034 { 1035 return !equalLettersIgnoringASCIICase(hasPopupValue(), "false"); 1035 // Return true if this has the aria-haspopup attribute, or if it has an ancestor of type link with the aria-haspopup attribute. 1036 return AccessibilityObject::matchedParent(*this, true, [this] (const AccessibilityObject& object) { 1037 return (this == &object) ? !equalLettersIgnoringASCIICase(object.hasPopupValue(), "false") 1038 : object.isLink() && !equalLettersIgnoringASCIICase(object.hasPopupValue(), "false"); 1039 }); 1036 1040 } 1037 1041 -
trunk/Tools/ChangeLog
r246711 r246715 1 2019-06-22 Andres Gonzalez <andresg_22@apple.com> 2 3 Accessibility objects contained in links should honor the aria-haspopup attribute in the ancestor link. 4 https://bugs.webkit.org/show_bug.cgi?id=199107 5 <rdar://problem/43663611> 6 7 Reviewed by Chris Fleizach. 8 9 iOS implementation for AccessibilityUIElement::hasPopup. 10 * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: 11 (WTR::AccessibilityUIElement::hasPopup const): 12 1 13 2019-06-22 Konstantin Tokarev <annulen@yandex.ru> 2 14 -
trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm
r245912 r246715 87 87 - (NSString *)accessibilityTextualContext; 88 88 - (NSString *)accessibilityRoleDescription; 89 - (BOOL)accessibilityHasPopup; 89 90 - (NSString *)accessibilityColorStringValue; 90 91 … … 1055 1056 bool AccessibilityUIElement::hasPopup() const 1056 1057 { 1057 return false;1058 return [m_element accessibilityHasPopup]; 1058 1059 } 1059 1060
Note: See TracChangeset
for help on using the changeset viewer.