Title: [270896] trunk
- Revision
- 270896
- Author
- [email protected]
- Date
- 2020-12-16 10:23:34 -0800 (Wed, 16 Dec 2020)
Log Message
AX: Update list heuristics to include linked lists inside navigation containers
https://bugs.webkit.org/show_bug.cgi?id=193382
<rdar://problem/47233475>
Reviewed by Zalan Bujtas.
Source/WebCore:
If an unstyled list is inside a <nav> or a role=navigation, it should be marked
as an accessibility list.
Updated test: accessibility/list-detection2.html
* accessibility/AccessibilityList.cpp:
(WebCore::AccessibilityList::determineAccessibilityRole):
LayoutTests:
* accessibility/list-detection2-expected.txt:
* accessibility/list-detection2.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (270895 => 270896)
--- trunk/LayoutTests/ChangeLog 2020-12-16 17:28:20 UTC (rev 270895)
+++ trunk/LayoutTests/ChangeLog 2020-12-16 18:23:34 UTC (rev 270896)
@@ -1,3 +1,14 @@
+2020-12-16 Chris Fleizach <[email protected]>
+
+ AX: Update list heuristics to include linked lists inside navigation containers
+ https://bugs.webkit.org/show_bug.cgi?id=193382
+ <rdar://problem/47233475>
+
+ Reviewed by Zalan Bujtas.
+
+ * accessibility/list-detection2-expected.txt:
+ * accessibility/list-detection2.html:
+
2020-12-16 Zalan Bujtas <[email protected]>
[LFC][BFC] Non-quantitative values such as auto and min-content are not influenced by the box-sizing property
Modified: trunk/LayoutTests/accessibility/list-detection2-expected.txt (270895 => 270896)
--- trunk/LayoutTests/accessibility/list-detection2-expected.txt 2020-12-16 17:28:20 UTC (rev 270895)
+++ trunk/LayoutTests/accessibility/list-detection2-expected.txt 2020-12-16 18:23:34 UTC (rev 270896)
@@ -17,6 +17,8 @@
PASS: ul w/ bullet content on inline ::before -> list.
PASS: ol w/ counter content on ::before -> list.
PASS: ol w/ counter content on inline ::before -> list.
+PASS: ul list in a navigation role -> list.
+PASS: ol list in a nav element -> list.
PASS: ul w/ background image (NOT A LIST) -> .
PASS: ul w/ background on ::before (NOT A LIST) -> .
PASS: ul w/o explicit role and displayed inline, which defaults to no markers (NOT A LIST) -> .
Modified: trunk/LayoutTests/accessibility/list-detection2.html (270895 => 270896)
--- trunk/LayoutTests/accessibility/list-detection2.html 2020-12-16 17:28:20 UTC (rev 270895)
+++ trunk/LayoutTests/accessibility/list-detection2.html 2020-12-16 18:23:34 UTC (rev 270896)
@@ -113,6 +113,24 @@
<li>bar</li>
<li>baz</li>
</ol>
+ <div role="navigation">
+ <div>
+ <ul data-role="list" class="ex nomarkers" style="list-style-type:none" data-note=" list in a navigation role">
+ <li>foo</li>
+ <li>bar</li>
+ <li>baz</li>
+ </ul>
+ </div>
+ </div>
+ <nav>
+ <div>
+ <ol data-role="list" class="ex nomarkers" style="list-style-type:none" data-note=" list in a nav element">
+ <li>foo</li>
+ <li>bar</li>
+ <li>baz</li>
+ </ol>
+ </div>
+ </nav>
<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>
Modified: trunk/Source/WebCore/ChangeLog (270895 => 270896)
--- trunk/Source/WebCore/ChangeLog 2020-12-16 17:28:20 UTC (rev 270895)
+++ trunk/Source/WebCore/ChangeLog 2020-12-16 18:23:34 UTC (rev 270896)
@@ -1,3 +1,19 @@
+2020-12-16 Chris Fleizach <[email protected]>
+
+ AX: Update list heuristics to include linked lists inside navigation containers
+ https://bugs.webkit.org/show_bug.cgi?id=193382
+ <rdar://problem/47233475>
+
+ Reviewed by Zalan Bujtas.
+
+ If an unstyled list is inside a <nav> or a role=navigation, it should be marked
+ as an accessibility list.
+
+ Updated test: accessibility/list-detection2.html
+
+ * accessibility/AccessibilityList.cpp:
+ (WebCore::AccessibilityList::determineAccessibilityRole):
+
2020-12-16 Simon Fraser <[email protected]>
Make FrameView::m_customSizeForResizeEvent an Optional<IntSize>
Modified: trunk/Source/WebCore/accessibility/AccessibilityList.cpp (270895 => 270896)
--- trunk/Source/WebCore/accessibility/AccessibilityList.cpp 2020-12-16 17:28:20 UTC (rev 270895)
+++ trunk/Source/WebCore/accessibility/AccessibilityList.cpp 2020-12-16 18:23:34 UTC (rev 270896)
@@ -179,14 +179,19 @@
}
}
}
-
+
// Non <ul> lists and ARIA lists only need to have one child.
// <ul>, <ol> lists need to have visible markers.
if (ariaRoleAttribute() != AccessibilityRole::Unknown) {
if (!listItemCount)
role = AccessibilityRole::ApplicationGroup;
- } else if (!hasVisibleMarkers)
- role = AccessibilityRole::Group;
+ } else if (!hasVisibleMarkers) {
+ // http://webkit.org/b/193382 lists inside of navigation hierarchies should still be considered lists.
+ if (Accessibility::findAncestor<AXCoreObject>(*this, false, [] (auto& object) { return object.roleValue() == AccessibilityRole::LandmarkNavigation; }))
+ role = AccessibilityRole::List;
+ else
+ role = AccessibilityRole::Group;
+ }
return role;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes