Title: [240709] trunk
- Revision
- 240709
- Author
- [email protected]
- Date
- 2019-01-30 07:07:05 -0800 (Wed, 30 Jan 2019)
Log Message
AX: Role=switch not returning correct accessibilityValue
https://bugs.webkit.org/show_bug.cgi?id=194006
Reviewed by Joanmarie Diggs.
Source/WebCore:
Return the toggle state of a role=switch element.
Test: accessibility/ios-simulator/role-switch.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityValue]):
LayoutTests:
* accessibility/ios-simulator/role-switch-expected.txt: Added.
* accessibility/ios-simulator/role-switch.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (240708 => 240709)
--- trunk/LayoutTests/ChangeLog 2019-01-30 15:04:53 UTC (rev 240708)
+++ trunk/LayoutTests/ChangeLog 2019-01-30 15:07:05 UTC (rev 240709)
@@ -1,3 +1,13 @@
+2019-01-30 Chris Fleizach <[email protected]>
+
+ AX: Role=switch not returning correct accessibilityValue
+ https://bugs.webkit.org/show_bug.cgi?id=194006
+
+ Reviewed by Joanmarie Diggs.
+
+ * accessibility/ios-simulator/role-switch-expected.txt: Added.
+ * accessibility/ios-simulator/role-switch.html: Added.
+
2019-01-30 Zan Dobersek <[email protected]>
Unreviewed WPE gardening. Manage failures in the imported WPT tests,
Added: trunk/LayoutTests/accessibility/ios-simulator/role-switch-expected.txt (0 => 240709)
--- trunk/LayoutTests/accessibility/ios-simulator/role-switch-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/ios-simulator/role-switch-expected.txt 2019-01-30 15:07:05 UTC (rev 240709)
@@ -0,0 +1,12 @@
+
+This test thats accessibilityValue is correct for role=switch.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS element.stringValue is 'AXValue: 1'
+PASS element.stringValue is 'AXValue: 0'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/ios-simulator/role-switch.html (0 => 240709)
--- trunk/LayoutTests/accessibility/ios-simulator/role-switch.html (rev 0)
+++ trunk/LayoutTests/accessibility/ios-simulator/role-switch.html 2019-01-30 15:07:05 UTC (rev 240709)
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script>
+var successfullyParsed = false;
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+</head>
+<body>
+
+<button role="switch" aria-checked="true" id="switch" class="switch">
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This test thats accessibilityValue is correct for role=switch.");
+
+ if (window.accessibilityController) {
+
+ var element = accessibilityController.accessibleElementById("switch");
+ shouldBe("element.stringValue", "'AXValue: 1'");
+
+ document.getElementById("switch").ariaChecked = false;
+ shouldBe("element.stringValue", "'AXValue: 0'");
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src=""
+
+</body>
+</html>
+
Modified: trunk/Source/WebCore/ChangeLog (240708 => 240709)
--- trunk/Source/WebCore/ChangeLog 2019-01-30 15:04:53 UTC (rev 240708)
+++ trunk/Source/WebCore/ChangeLog 2019-01-30 15:07:05 UTC (rev 240709)
@@ -1,3 +1,17 @@
+2019-01-30 Chris Fleizach <[email protected]>
+
+ AX: Role=switch not returning correct accessibilityValue
+ https://bugs.webkit.org/show_bug.cgi?id=194006
+
+ Reviewed by Joanmarie Diggs.
+
+ Return the toggle state of a role=switch element.
+
+ Test: accessibility/ios-simulator/role-switch.html
+
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (-[WebAccessibilityObjectWrapper accessibilityValue]):
+
2019-01-29 Rob Buis <[email protected]>
Align with Fetch on data: URLs
Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (240708 => 240709)
--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2019-01-30 15:04:53 UTC (rev 240708)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2019-01-30 15:07:05 UTC (rev 240709)
@@ -1404,7 +1404,7 @@
return value;
AccessibilityRole role = m_object->roleValue();
- if (m_object->isCheckboxOrRadio() || role == AccessibilityRole::MenuItemCheckbox || role == AccessibilityRole::MenuItemRadio) {
+ if (m_object->isCheckboxOrRadio() || role == AccessibilityRole::MenuItemCheckbox || role == AccessibilityRole::MenuItemRadio || role == AccessibilityRole::Switch) {
switch (m_object->checkboxOrRadioValue()) {
case AccessibilityButtonState::Off:
return [NSString stringWithFormat:@"%d", 0];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes