Changeset 270896 in webkit
- Timestamp:
- Dec 16, 2020 10:23:34 AM (19 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/accessibility/list-detection2-expected.txt (modified) (1 diff)
-
LayoutTests/accessibility/list-detection2.html (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/AccessibilityList.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r270891 r270896 1 2020-12-16 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Update list heuristics to include linked lists inside navigation containers 4 https://bugs.webkit.org/show_bug.cgi?id=193382 5 <rdar://problem/47233475> 6 7 Reviewed by Zalan Bujtas. 8 9 * accessibility/list-detection2-expected.txt: 10 * accessibility/list-detection2.html: 11 1 12 2020-12-16 Zalan Bujtas <zalan@apple.com> 2 13 -
trunk/LayoutTests/accessibility/list-detection2-expected.txt
r267644 r270896 18 18 PASS: ol w/ counter content on ::before -> list. 19 19 PASS: ol w/ counter content on inline ::before -> list. 20 PASS: ul list in a navigation role -> list. 21 PASS: ol list in a nav element -> list. 20 22 PASS: ul w/ background image (NOT A LIST) -> . 21 23 PASS: ul w/ background on ::before (NOT A LIST) -> . -
trunk/LayoutTests/accessibility/list-detection2.html
r214623 r270896 114 114 <li>baz</li> 115 115 </ol> 116 <div role="navigation"> 117 <div> 118 <ul data-role="list" class="ex nomarkers" style="list-style-type:none" data-note=" list in a navigation role"> 119 <li>foo</li> 120 <li>bar</li> 121 <li>baz</li> 122 </ul> 123 </div> 124 </div> 125 <nav> 126 <div> 127 <ol data-role="list" class="ex nomarkers" style="list-style-type:none" data-note=" list in a nav element"> 128 <li>foo</li> 129 <li>bar</li> 130 <li>baz</li> 131 </ol> 132 </div> 133 </nav> 116 134 117 135 <p>Since many web pages suffer from "list-itis" and some users have noted that they don't want to hear about so many lists, any UL or OL that does not match one of the above heuristics should not be exposed as a list. Chances are that they are just presentational lists using the elements for the sake of a styling hook.</p> -
trunk/Source/WebCore/ChangeLog
r270892 r270896 1 2020-12-16 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Update list heuristics to include linked lists inside navigation containers 4 https://bugs.webkit.org/show_bug.cgi?id=193382 5 <rdar://problem/47233475> 6 7 Reviewed by Zalan Bujtas. 8 9 If an unstyled list is inside a <nav> or a role=navigation, it should be marked 10 as an accessibility list. 11 12 Updated test: accessibility/list-detection2.html 13 14 * accessibility/AccessibilityList.cpp: 15 (WebCore::AccessibilityList::determineAccessibilityRole): 16 1 17 2020-12-16 Simon Fraser <simon.fraser@apple.com> 2 18 -
trunk/Source/WebCore/accessibility/AccessibilityList.cpp
r245565 r270896 180 180 } 181 181 } 182 182 183 183 // Non <ul> lists and ARIA lists only need to have one child. 184 184 // <ul>, <ol> lists need to have visible markers. … … 186 186 if (!listItemCount) 187 187 role = AccessibilityRole::ApplicationGroup; 188 } else if (!hasVisibleMarkers) 189 role = AccessibilityRole::Group; 188 } else if (!hasVisibleMarkers) { 189 // http://webkit.org/b/193382 lists inside of navigation hierarchies should still be considered lists. 190 if (Accessibility::findAncestor<AXCoreObject>(*this, false, [] (auto& object) { return object.roleValue() == AccessibilityRole::LandmarkNavigation; })) 191 role = AccessibilityRole::List; 192 else 193 role = AccessibilityRole::Group; 194 } 190 195 191 196 return role;
Note: See TracChangeset
for help on using the changeset viewer.