Title: [284246] trunk
- Revision
- 284246
- Author
- [email protected]
- Date
- 2021-10-15 08:13:22 -0700 (Fri, 15 Oct 2021)
Log Message
AX: role="math" elements are no longer considered to have presentational children
https://bugs.webkit.org/show_bug.cgi?id=231756
Patch by Tyler Wilcock <[email protected]> on 2021-10-15
Reviewed by Chris Fleizach and Darin Adler.
Source/WebCore:
As of WAI-ARIA 1.2, role="math" elements are no longer considered to
have presentational children.
Test: accessibility/math-has-non-presentational-children.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren const):
Allow AccessibilityRole::DocumentMath elements to have children.
LayoutTests:
* accessibility/math-has-non-presentational-children-expected.txt: Added.
* accessibility/math-has-non-presentational-children.html: Added.
* accessibility/presentational-children-expected.txt:
* accessibility/presentational-children.html:
Remove the role="math" element from this test because as of WAI-ARIA
1.2 role="math" is no longer considered to have presentational children.
Also change this test to ensure role="meter" elements are considered to
have presentational children because that testcase was missing.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (284245 => 284246)
--- trunk/LayoutTests/ChangeLog 2021-10-15 14:35:04 UTC (rev 284245)
+++ trunk/LayoutTests/ChangeLog 2021-10-15 15:13:22 UTC (rev 284246)
@@ -1,5 +1,22 @@
2021-10-15 Tyler Wilcock <[email protected]>
+ AX: role="math" elements are no longer considered to have presentational children
+ https://bugs.webkit.org/show_bug.cgi?id=231756
+
+ Reviewed by Chris Fleizach and Darin Adler.
+
+ * accessibility/math-has-non-presentational-children-expected.txt: Added.
+ * accessibility/math-has-non-presentational-children.html: Added.
+
+ * accessibility/presentational-children-expected.txt:
+ * accessibility/presentational-children.html:
+ Remove the role="math" element from this test because as of WAI-ARIA
+ 1.2 role="math" is no longer considered to have presentational children.
+ Also change this test to ensure role="meter" elements are considered to
+ have presentational children because that testcase was missing.
+
+2021-10-15 Tyler Wilcock <[email protected]>
+
AX: WebKit should not expose redundant AXGroups with missing role when the label is the same as the contents
https://bugs.webkit.org/show_bug.cgi?id=169924
Added: trunk/LayoutTests/accessibility/math-has-non-presentational-children-expected.txt (0 => 284246)
--- trunk/LayoutTests/accessibility/math-has-non-presentational-children-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/math-has-non-presentational-children-expected.txt 2021-10-15 15:13:22 UTC (rev 284246)
@@ -0,0 +1,10 @@
+This test ensures that role="math" elements are not considered to have presentational children. This was the case in WAI-ARIA 1.1 (https://www.w3.org/TR/wai-aria-1.1/#math-0), but changed in WAI-ARIA 1.2 (https://www.w3.org/TR/wai-aria-1.2/#math).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS mathElement.childrenCount is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/math-has-non-presentational-children.html (0 => 284246)
--- trunk/LayoutTests/accessibility/math-has-non-presentational-children.html (rev 0)
+++ trunk/LayoutTests/accessibility/math-has-non-presentational-children.html 2021-10-15 15:13:22 UTC (rev 284246)
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+
+<div id="content">
+ <div id="math-element" role="math"><mi>sin</mi></div>
+</div>
+
+<script>
+ description(`
+ This test ensures that role="math" elements are not considered to have presentational children.
+ This was the case in WAI-ARIA 1.1 (https://www.w3.org/TR/wai-aria-1.1/#math-0), but changed in
+ WAI-ARIA 1.2 (https://www.w3.org/TR/wai-aria-1.2/#math).
+ `);
+
+ if (window.accessibilityController) {
+ var mathElement = accessibilityController.accessibleElementById("math-element");
+ shouldBe("mathElement.childrenCount", "1");
+
+ document.getElementById("content").style.visibility = "hidden";
+ }
+</script>
+</body>
+</html>
+
Modified: trunk/LayoutTests/accessibility/presentational-children-expected.txt (284245 => 284246)
--- trunk/LayoutTests/accessibility/presentational-children-expected.txt 2021-10-15 14:35:04 UTC (rev 284245)
+++ trunk/LayoutTests/accessibility/presentational-children-expected.txt 2021-10-15 15:13:22 UTC (rev 284246)
@@ -6,9 +6,9 @@
button childrenCount: 0
checkbox childrenCount: 0
img childrenCount: 0
-math childrenCount: 0
menuitemcheckbox childrenCount: 0
menuitemradio childrenCount: 0
+meter childrenCount: 0
option childrenCount: 0
progressbar childrenCount: 0
radio childrenCount: 0
Modified: trunk/LayoutTests/accessibility/presentational-children.html (284245 => 284246)
--- trunk/LayoutTests/accessibility/presentational-children.html 2021-10-15 14:35:04 UTC (rev 284245)
+++ trunk/LayoutTests/accessibility/presentational-children.html 2021-10-15 15:13:22 UTC (rev 284246)
@@ -8,11 +8,11 @@
<div role="button" tabindex="0" class="ex"><div>a</div><div>b</div></div>
<div role="checkbox" tabindex="0" class="ex"><div>a</div><div>b</div></div>
<div role="img" tabindex="0" class="ex"><div>a</div><div>b</div></div>
- <div role="math" tabindex="0" class="ex"><div>a</div><div>b</div></div>
<div role="menu">
<div role="menuitemcheckbox" tabindex="0" class="ex"><div>a</div><div>b</div></div>
<div role="menuitemradio" tabindex="0" class="ex"><div>a</div><div>b</div></div>
</div>
+ <div role="meter" tabindex="0" class="ex"><div>a</div><div>b</div></div>
<div role="listbox">
<div role="option" tabindex="0" class="ex"><div>a</div><div>b</div></div>
</div>
Modified: trunk/Source/WebCore/ChangeLog (284245 => 284246)
--- trunk/Source/WebCore/ChangeLog 2021-10-15 14:35:04 UTC (rev 284245)
+++ trunk/Source/WebCore/ChangeLog 2021-10-15 15:13:22 UTC (rev 284246)
@@ -1,5 +1,21 @@
2021-10-15 Tyler Wilcock <[email protected]>
+ AX: role="math" elements are no longer considered to have presentational children
+ https://bugs.webkit.org/show_bug.cgi?id=231756
+
+ Reviewed by Chris Fleizach and Darin Adler.
+
+ As of WAI-ARIA 1.2, role="math" elements are no longer considered to
+ have presentational children.
+
+ Test: accessibility/math-has-non-presentational-children.html
+
+ * accessibility/AccessibilityNodeObject.cpp:
+ (WebCore::AccessibilityNodeObject::canHaveChildren const):
+ Allow AccessibilityRole::DocumentMath elements to have children.
+
+2021-10-15 Tyler Wilcock <[email protected]>
+
AX: WebKit should not expose redundant AXGroups with missing role when the label is the same as the contents
https://bugs.webkit.org/show_bug.cgi?id=169924
Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (284245 => 284246)
--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2021-10-15 14:35:04 UTC (rev 284245)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2021-10-15 15:13:22 UTC (rev 284246)
@@ -394,11 +394,6 @@
case AccessibilityRole::Splitter:
case AccessibilityRole::Meter:
return false;
- case AccessibilityRole::DocumentMath:
-#if ENABLE(MATHML)
- return node()->isMathMLElement();
-#endif
- return false;
default:
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes