Title: [202194] trunk
- Revision
- 202194
- Author
- [email protected]
- Date
- 2016-06-17 18:19:13 -0700 (Fri, 17 Jun 2016)
Log Message
AX: HTML indeterminate IDL attribute not mapped to checkbox value=2 for native checkboxes
https://bugs.webkit.org/show_bug.cgi?id=158876
<rdar://problem/26842619>
Reviewed by Joanmarie Diggs.
Source/WebCore:
The indeterminate state was not being reported for native checkboxes.
Also the isIndeterminate() method was relying on whether the appearance changed, which does not happen on Mac, so that
was not being reported correctly. Changed that to check the actual attribute.
Test: accessibility/checkbox-mixed-value.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isIndeterminate):
(WebCore::AccessibilityNodeObject::isPressed):
(WebCore::AccessibilityNodeObject::checkboxOrRadioValue):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::checkboxOrRadioValue):
LayoutTests:
* accessibility/checkbox-mixed-value-expected.txt: Added.
* accessibility/checkbox-mixed-value.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (202193 => 202194)
--- trunk/LayoutTests/ChangeLog 2016-06-18 01:09:09 UTC (rev 202193)
+++ trunk/LayoutTests/ChangeLog 2016-06-18 01:19:13 UTC (rev 202194)
@@ -1,3 +1,14 @@
+2016-06-17 Chris Fleizach <[email protected]>
+
+ AX: HTML indeterminate IDL attribute not mapped to checkbox value=2 for native checkboxes
+ https://bugs.webkit.org/show_bug.cgi?id=158876
+ <rdar://problem/26842619>
+
+ Reviewed by Joanmarie Diggs.
+
+ * accessibility/checkbox-mixed-value-expected.txt: Added.
+ * accessibility/checkbox-mixed-value.html: Added.
+
2016-06-17 Dean Jackson <[email protected]>
REGRESSION (r199819): CrashTracer: [GraphicsContext3D::getInternalFramebufferSize
Added: trunk/LayoutTests/accessibility/checkbox-mixed-value-expected.txt (0 => 202194)
--- trunk/LayoutTests/accessibility/checkbox-mixed-value-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/checkbox-mixed-value-expected.txt 2016-06-18 01:19:13 UTC (rev 202194)
@@ -0,0 +1,18 @@
+Tests whether mixed values are reported properly on native checkboxes.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+1: AXRole: AXCheckBox
+Indeterminate status: true
+
+2: AXRole: AXCheckBox
+Indeterminate status: false
+
+3: AXRole: AXCheckBox
+Indeterminate status: false
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/checkbox-mixed-value.html (0 => 202194)
--- trunk/LayoutTests/accessibility/checkbox-mixed-value.html (rev 0)
+++ trunk/LayoutTests/accessibility/checkbox-mixed-value.html 2016-06-18 01:19:13 UTC (rev 202194)
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<div id="content">
+
+<input type="checkbox" id="element1" indeterminate="true">
+<input type="checkbox" id="element2" indeterminate="false">
+<input type="checkbox" id="element3">
+
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("Tests whether mixed values are reported properly on native checkboxes.");
+
+ if (window.accessibilityController) {
+ for (var i = 1; i <= 3; i++) {
+ var element = accessibilityController.accessibleElementById("element" + i);
+ debug(i + ": " + element.role);
+ debug("Indeterminate status: " + element.isIndeterminate + "\n");
+ }
+
+ document.getElementById("content").style.visibility = "hidden";
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (202193 => 202194)
--- trunk/Source/WebCore/ChangeLog 2016-06-18 01:09:09 UTC (rev 202193)
+++ trunk/Source/WebCore/ChangeLog 2016-06-18 01:19:13 UTC (rev 202194)
@@ -1,3 +1,25 @@
+2016-06-17 Chris Fleizach <[email protected]>
+
+ AX: HTML indeterminate IDL attribute not mapped to checkbox value=2 for native checkboxes
+ https://bugs.webkit.org/show_bug.cgi?id=158876
+ <rdar://problem/26842619>
+
+ Reviewed by Joanmarie Diggs.
+
+ The indeterminate state was not being reported for native checkboxes.
+
+ Also the isIndeterminate() method was relying on whether the appearance changed, which does not happen on Mac, so that
+ was not being reported correctly. Changed that to check the actual attribute.
+
+ Test: accessibility/checkbox-mixed-value.html
+
+ * accessibility/AccessibilityNodeObject.cpp:
+ (WebCore::AccessibilityNodeObject::isIndeterminate):
+ (WebCore::AccessibilityNodeObject::isPressed):
+ (WebCore::AccessibilityNodeObject::checkboxOrRadioValue):
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::checkboxOrRadioValue):
+
2016-06-17 Dean Jackson <[email protected]>
REGRESSION (r199819): CrashTracer: [GraphicsContext3D::getInternalFramebufferSize
Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (202193 => 202194)
--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2016-06-18 01:09:09 UTC (rev 202193)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2016-06-18 01:19:13 UTC (rev 202194)
@@ -665,8 +665,7 @@
bool AccessibilityNodeObject::isIndeterminate() const
{
- auto* node = this->node();
- return is<HTMLInputElement>(node) && downcast<HTMLInputElement>(*node).shouldAppearIndeterminate();
+ return equalLettersIgnoringASCIICase(getAttribute(indeterminateAttr), "true");
}
bool AccessibilityNodeObject::isPressed() const
@@ -938,7 +937,7 @@
AccessibilityButtonState AccessibilityNodeObject::checkboxOrRadioValue() const
{
if (isNativeCheckboxOrRadio())
- return isChecked() ? ButtonStateOn : ButtonStateOff;
+ return isIndeterminate() ? ButtonStateMixed : isChecked() ? ButtonStateOn : ButtonStateOff;
return AccessibilityObject::checkboxOrRadioValue();
}
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (202193 => 202194)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2016-06-18 01:09:09 UTC (rev 202193)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2016-06-18 01:19:13 UTC (rev 202194)
@@ -2498,7 +2498,7 @@
return ButtonStateMixed;
}
- if (equalLettersIgnoringASCIICase(getAttribute(indeterminateAttr), "true"))
+ if (isIndeterminate())
return ButtonStateMixed;
return ButtonStateOff;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes