Changeset 293345 in webkit
- Timestamp:
- Apr 25, 2022 1:49:06 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/accessibility/ignored-aria-role-description-expected.txt (added)
-
LayoutTests/accessibility/ignored-aria-role-description.html (added)
-
LayoutTests/platform/gtk/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/win/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/AccessibilityObject.cpp (modified) (1 diff)
-
Source/WebCore/accessibility/AccessibilityObject.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r293333 r293345 1 2022-04-25 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Don't expose aria-roledescription value on "generic" elements (e.g. div and span) unless explicit role value is also defined 4 https://bugs.webkit.org/show_bug.cgi?id=174248 5 <rdar://problem/33178050> 6 7 Reviewed by Andres Gonzalez. 8 9 * accessibility/ignored-aria-role-description-expected.txt: Added. 10 * accessibility/ignored-aria-role-description.html: Added. 11 1 12 2022-04-25 Antti Koivisto <antti@apple.com> 2 13 -
trunk/LayoutTests/platform/gtk/TestExpectations
r292904 r293345 1860 1860 1861 1861 accessibility/dialog-properties.html [ Skip ] 1862 accessibility/ignored-aria-role-description.html [ Skip ] 1862 1863 1863 1864 # These tests require platform support. -
trunk/LayoutTests/platform/win/TestExpectations
r293260 r293345 464 464 # Probably wrong role after adding children to list (AXGroup instead of AXList). 465 465 accessibility/list-with-dynamically-changing-content.html [ Skip ] 466 accessibility/ignored-aria-role-description.html [ Skip ] 466 467 467 468 # Need to implement AccessibilityUIElement::clearSelectedChildren() -
trunk/Source/WebCore/ChangeLog
r293337 r293345 1 2022-04-25 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Don't expose aria-roledescription value on "generic" elements (e.g. div and span) unless explicit role value is also defined 4 https://bugs.webkit.org/show_bug.cgi?id=174248 5 <rdar://problem/33178050> 6 7 Reviewed by Andres Gonzalez. 8 9 ARIA spec states to not expose the role description on "generic" elements. 10 https://www.w3.org/TR/wai-aria/#aria-roledescription 11 12 Test: accessibility/ignored-aria-role-description.html 13 14 * accessibility/AccessibilityObject.cpp: 15 (WebCore::AccessibilityObject::supportsARIARoleDescription const): 16 (WebCore::AccessibilityObject::roleDescription const): 17 * accessibility/AccessibilityObject.h: 18 1 19 2022-04-25 Tim Nguyen <ntim@apple.com> 2 20 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r293298 r293345 2705 2705 } 2706 2706 2707 // ARIA spec: User agents must not expose the aria-roledescription property if the element to which aria-roledescription is applied does not have a valid WAI-ARIA role or does not have an implicit WAI-ARIA role semantic. 2708 bool AccessibilityObject::supportsARIARoleDescription() const 2709 { 2710 auto role = this->roleValue(); 2711 switch (role) { 2712 case AccessibilityRole::Div: 2713 case AccessibilityRole::Unknown: 2714 return false; 2715 default: 2716 return true; 2717 } 2718 } 2719 2707 2720 String AccessibilityObject::roleDescription() const 2708 2721 { 2709 2722 // aria-roledescription takes precedence over any other rule. 2710 String roleDescription = stripLeadingAndTrailingHTMLSpaces(getAttribute(aria_roledescriptionAttr)); 2711 if (!roleDescription.isEmpty()) 2712 return roleDescription; 2713 2714 roleDescription = rolePlatformDescription(); 2723 if (supportsARIARoleDescription()) { 2724 auto roleDescription = stripLeadingAndTrailingHTMLSpaces(getAttribute(aria_roledescriptionAttr)); 2725 if (!roleDescription.isEmpty()) 2726 return roleDescription; 2727 } 2728 2729 auto roleDescription = rolePlatformDescription(); 2715 2730 if (!roleDescription.isEmpty()) 2716 2731 return roleDescription; -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r293298 r293345 299 299 bool supportsCheckedState() const override; 300 300 301 bool supportsARIARoleDescription() const; 301 302 bool supportsARIAOwns() const override { return false; } 302 303 bool isActiveDescendantOfFocusedContainer() const override;
Note: See TracChangeset
for help on using the changeset viewer.