Changeset 222433 in webkit
- Timestamp:
- Sep 24, 2017 4:52:36 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r222432 r222433 1 2017-09-24 Joanmarie Diggs <jdiggs@igalia.com> 2 3 [ATK] Object attributes are missing for ARIA live region roles 4 https://bugs.webkit.org/show_bug.cgi?id=171174 5 6 Reviewed by Chris Fleizach. 7 8 Move two macOS tests to the shared layout test set. 9 10 * accessibility/aria-liveregion-marquee-default-expected.txt: Renamed from LayoutTests/accessibility/mac/aria-liveregion-marquee-default-expected.txt. 11 * accessibility/aria-liveregion-marquee-default.html: Renamed from LayoutTests/accessibility/mac/aria-liveregion-marquee-default.html. 12 * accessibility/aria-liveregions-attributes-expected.txt: Renamed from LayoutTests/accessibility/mac/aria-liveregions-attributes-expected.txt. 13 * accessibility/aria-liveregions-attributes.html: Renamed from LayoutTests/accessibility/mac/aria-liveregions-attributes.html. 14 * platform/win/TestExpectations: Add the above tests to the list of known failures. 15 1 16 2017-09-24 Zan Dobersek <zdobersek@igalia.com> 2 17 -
trunk/LayoutTests/accessibility/aria-liveregion-marquee-default.html
r222432 r222433 2 2 <html> 3 3 <head> 4 <script src="../ ../resources/js-test-pre.js"></script>4 <script src="../resources/js-test-pre.js"></script> 5 5 </head> 6 6 <body id="body"> … … 28 28 </script> 29 29 30 <script src="../ ../resources/js-test-post.js"></script>30 <script src="../resources/js-test-post.js"></script> 31 31 </body> 32 32 </html> -
trunk/LayoutTests/accessibility/aria-liveregions-attributes.html
r222432 r222433 2 2 <html> 3 3 <head> 4 <script src="../ ../resources/js-test-pre.js"></script>4 <script src="../resources/js-test-pre.js"></script> 5 5 </head> 6 6 <body id="body"> … … 103 103 </script> 104 104 105 <script src="../ ../resources/js-test-post.js"></script>105 <script src="../resources/js-test-post.js"></script> 106 106 </body> 107 107 </html> -
trunk/LayoutTests/platform/win/TestExpectations
r222423 r222433 46 46 47 47 accessibility/media-emits-object-replacement.html [ Failure ] 48 accessibility/aria-liveregions-attributes.html [ Failure ] 49 accessibility/aria-liveregion-marquee-default.html [ Failure ] 48 50 49 51 -
trunk/Source/WebCore/ChangeLog
r222429 r222433 1 2017-09-24 Joanmarie Diggs <jdiggs@igalia.com> 2 3 [ATK] Object attributes are missing for ARIA live region roles 4 https://bugs.webkit.org/show_bug.cgi?id=171174 5 6 Reviewed by Chris Fleizach. 7 8 Expose the values of aria-live, aria-atomic, and aria-relevant via AtkObject 9 attributes on live region elements and their descendants. In order to accomplish 10 exposure on descendants, add AccessibilityObject::ariaLiveRegionAncestor(). Add an 11 optional argument, excludeIfOff, to AccessibilityObject::isInsideARIALiveRegion() 12 and AccessibilityObject::supportsARIALiveRegion(). This is needed because we need 13 to expose live region properties via ATK even in the case where the live region 14 is disabled/off, but supportsARIALiveRegion() deliberately checks if the live 15 region is enabled. 16 17 Tests: accessibility/aria-liveregion-marquee-default.html 18 accessibility/aria-liveregions-attributes.html 19 20 * accessibility/AccessibilityObject.cpp: 21 (WebCore::AccessibilityObject::isInsideARIALiveRegion const): 22 (WebCore::AccessibilityObject::ariaLiveRegionAncestor const): 23 (WebCore::AccessibilityObject::supportsARIALiveRegion const): 24 * accessibility/AccessibilityObject.h: 25 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: 26 (webkitAccessibleGetAttributes): 27 1 28 2017-09-23 Youenn Fablet <youenn@apple.com> 2 29 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r222013 r222433 2498 2498 } 2499 2499 2500 bool AccessibilityObject::isInsideARIALiveRegion() const 2501 { 2502 if (supportsARIALiveRegion()) 2503 return true; 2504 2505 return AccessibilityObject::matchedParent(*this, false, [] (const AccessibilityObject& object) { 2506 return object.supportsARIALiveRegion(); 2507 }) != nullptr; 2500 bool AccessibilityObject::isInsideARIALiveRegion(bool excludeIfOff) const 2501 { 2502 return ariaLiveRegionAncestor(excludeIfOff); 2503 } 2504 2505 AccessibilityObject* AccessibilityObject::ariaLiveRegionAncestor(bool excludeIfOff) const 2506 { 2507 return const_cast<AccessibilityObject*>(AccessibilityObject::matchedParent(*this, true, [excludeIfOff] (const AccessibilityObject& object) { 2508 return object.supportsARIALiveRegion(excludeIfOff); 2509 })); 2508 2510 } 2509 2511 … … 2536 2538 } 2537 2539 2538 bool AccessibilityObject::supportsARIALiveRegion() const 2539 { 2540 return liveRegionStatusIsEnabled(ariaLiveRegionStatus()); 2540 bool AccessibilityObject::supportsARIALiveRegion(bool excludeIfOff) const 2541 { 2542 const AtomicString& liveRegionStatus = ariaLiveRegionStatus(); 2543 return excludeIfOff ? liveRegionStatusIsEnabled(liveRegionStatus) : !liveRegionStatus.isEmpty(); 2541 2544 } 2542 2545 -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r219751 r222433 974 974 975 975 // ARIA live-region features. 976 bool supportsARIALiveRegion() const; 977 bool isInsideARIALiveRegion() const; 976 bool supportsARIALiveRegion(bool excludeIfOff = true) const; 977 bool isInsideARIALiveRegion(bool excludeIfOff = true) const; 978 AccessibilityObject* ariaLiveRegionAncestor(bool excludeIfOff = true) const; 978 979 virtual const String ariaLiveRegionStatus() const { return String(); } 979 980 virtual const AtomicString& ariaLiveRegionRelevant() const { return nullAtom(); } -
trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
r218809 r222433 548 548 if (!roleDescription.isEmpty()) 549 549 attributeSet = addToAtkAttributeSet(attributeSet, "roledescription", roleDescription.utf8().data()); 550 551 // We need to expose the live region attributes even if the live region is currently disabled/off. 552 if (auto liveContainer = coreObject->ariaLiveRegionAncestor(false)) { 553 String liveStatus = liveContainer->ariaLiveRegionStatus(); 554 String relevant = liveContainer->ariaLiveRegionRelevant(); 555 bool isAtomic = liveContainer->ariaLiveRegionAtomic(); 556 String liveRole = roleString.isEmpty() ? computedRoleString : roleString; 557 558 // According to the Core AAM, we need to expose the above properties with "container-" prefixed 559 // object attributes regardless of whether the container is this object, or an ancestor of it. 560 attributeSet = addToAtkAttributeSet(attributeSet, "container-live", liveStatus.utf8().data()); 561 attributeSet = addToAtkAttributeSet(attributeSet, "container-relevant", relevant.utf8().data()); 562 if (isAtomic) 563 attributeSet = addToAtkAttributeSet(attributeSet, "container-atomic", "true"); 564 if (!liveRole.isEmpty()) 565 attributeSet = addToAtkAttributeSet(attributeSet, "container-live-role", liveRole.utf8().data()); 566 567 // According to the Core AAM, if this object is the live region (rather than its descendant), 568 // we must expose the above properties on the object without a "container-" prefix. 569 if (liveContainer == coreObject) { 570 attributeSet = addToAtkAttributeSet(attributeSet, "live", liveStatus.utf8().data()); 571 attributeSet = addToAtkAttributeSet(attributeSet, "relevant", relevant.utf8().data()); 572 if (isAtomic) 573 attributeSet = addToAtkAttributeSet(attributeSet, "atomic", "true"); 574 } else if (!isAtomic && coreObject->ariaLiveRegionAtomic()) 575 attributeSet = addToAtkAttributeSet(attributeSet, "atomic", "true"); 576 } 550 577 551 578 return attributeSet; -
trunk/Tools/ChangeLog
r222426 r222433 1 2017-09-24 Joanmarie Diggs <jdiggs@igalia.com> 2 3 [ATK] Object attributes are missing for ARIA live region roles 4 https://bugs.webkit.org/show_bug.cgi?id=171174 5 6 Reviewed by Chris Fleizach. 7 8 Add support for testing property values for AXARIALive, AXARIAAtomic, and 9 AXARIARelevant. Also add handling for testing whether AXElementBusy is 10 "supported" (in ATK, busy is a state and is supported on all elements 11 regardless of whether the state is present or absent from the state set). 12 13 * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: 14 (WTR::AccessibilityUIElement::boolAttributeValue): 15 (WTR::AccessibilityUIElement::isAttributeSupported): 16 1 17 2017-09-23 Michael Catanzaro <mcatanzaro@igalia.com> 2 18 -
trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
r220403 r222433 83 83 SortNameIndex, 84 84 CurrentNameIndex, 85 AriaLiveNameIndex, 86 AriaAtomicNameIndex, 87 AriaRelevantNameIndex, 88 BusyNameIndex, 85 89 86 90 // Attribute values. … … 107 111 { "AXSortDirection", "sort" }, 108 112 { "AXARIACurrent", "current" }, 113 { "AXARIALive", "live" }, 114 { "AXARIAAtomic", "atomic" }, 115 { "AXARIARelevant", "relevant" }, 116 { "AXElementBusy", "busy" }, 109 117 110 118 // Attribute values. … … 1217 1225 return ATK_IS_TABLE_CELL(m_element.get()); 1218 1226 1227 if (attributeString == "AXARIAAtomic") { 1228 String atkAttribute = coreAttributeToAtkAttribute(attribute); 1229 return getAttributeSetValueForId(ATK_OBJECT(m_element.get()), ObjectAttributeType, atkAttribute) == "true"; 1230 } 1231 1219 1232 return false; 1220 1233 } … … 1284 1297 return false; 1285 1298 1299 // In ATK, "busy" is a state and is supported on all AtkObject instances. 1300 if (atkAttributeName == "busy") 1301 return true; 1302 1286 1303 // For now, an attribute is supported whether it's exposed as a object or a text attribute. 1287 1304 String attributeValue = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), ObjectAttributeType, atkAttributeName); 1288 1305 if (attributeValue.isEmpty()) 1289 1306 attributeValue = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), TextAttributeType, atkAttributeName); 1307 1308 // When the aria-live value is "off", we expose that value via the "live" object attribute. 1309 if (atkAttributeName == "live" && attributeValue == "off") 1310 return false; 1290 1311 1291 1312 return !attributeValue.isEmpty();
Note: See TracChangeset
for help on using the changeset viewer.