Title: [170678] trunk
Revision
170678
Author
[email protected]
Date
2014-07-01 16:57:07 -0700 (Tue, 01 Jul 2014)

Log Message

AX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
https://bugs.webkit.org/show_bug.cgi?id=133875

Reviewed by Enrica Casucci.

Source/WebCore:
Support the toggle button type in iOS.

Test: platform/ios-sim/accessibility/toggle-button.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):

LayoutTests:
* platform/ios-sim/accessibility/toggle-button-expected.txt: Added.
* platform/ios-sim/accessibility/toggle-button.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (170677 => 170678)


--- trunk/LayoutTests/ChangeLog	2014-07-01 23:40:32 UTC (rev 170677)
+++ trunk/LayoutTests/ChangeLog	2014-07-01 23:57:07 UTC (rev 170678)
@@ -1,3 +1,13 @@
+2014-07-01  Chris Fleizach  <[email protected]>
+
+        AX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
+        https://bugs.webkit.org/show_bug.cgi?id=133875
+
+        Reviewed by Enrica Casucci.
+
+        * platform/ios-sim/accessibility/toggle-button-expected.txt: Added.
+        * platform/ios-sim/accessibility/toggle-button.html: Added.
+
 2014-07-01  Dean Jackson  <[email protected]>
 
         [iOS] Subsampled JPEG images do not draw correctly via the canvas APIs

Added: trunk/LayoutTests/platform/ios-sim/accessibility/toggle-button-expected.txt (0 => 170678)


--- trunk/LayoutTests/platform/ios-sim/accessibility/toggle-button-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/ios-sim/accessibility/toggle-button-expected.txt	2014-07-01 23:57:07 UTC (rev 170678)
@@ -0,0 +1,14 @@
+Bold Italic
+This makes sure that toggle buttons are exposed properly on iOS
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Button1 : AXLabel: Bold
+Button1 : AXValue: 
+Button2 : AXLabel: Italic
+Button2 : AXValue: 
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/platform/ios-sim/accessibility/toggle-button.html (0 => 170678)


--- trunk/LayoutTests/platform/ios-sim/accessibility/toggle-button.html	                        (rev 0)
+++ trunk/LayoutTests/platform/ios-sim/accessibility/toggle-button.html	2014-07-01 23:57:07 UTC (rev 170678)
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script>
+var successfullyParsed = false;
+</script>
+</head>
+<body id="body">
+
+<a id="button1" href="" _onclick_="return toggle(event);" _onkeypress_="return handleKeyPress(event);" role="button" aria-pressed="false" tabindex="0">Bold</a>
+<button id="button2" _onclick_="return toggle(event);" aria-pressed="true">Italic</button>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This makes sure that toggle buttons are exposed properly on iOS");
+
+    if (window.accessibilityController) {
+
+        var button1 = accessibilityController.accessibleElementById("button1");
+        debug("Button1 : " + button1.iphoneLabel);
+        debug("Button1 : " + button1.iphoneValue);
+
+        var button2 = accessibilityController.accessibleElementById("button2");
+        debug("Button2 : " + button2.iphoneLabel);
+        debug("Button2 : " + button2.iphoneValue);
+    }
+
+    successfullyParsed = true;
+</script>
+
+<script src=""
+</body>
+</html>
+

Modified: trunk/Source/WebCore/ChangeLog (170677 => 170678)


--- trunk/Source/WebCore/ChangeLog	2014-07-01 23:40:32 UTC (rev 170677)
+++ trunk/Source/WebCore/ChangeLog	2014-07-01 23:57:07 UTC (rev 170678)
@@ -1,3 +1,19 @@
+2014-07-01  Chris Fleizach  <[email protected]>
+
+        AX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
+        https://bugs.webkit.org/show_bug.cgi?id=133875
+
+        Reviewed by Enrica Casucci.
+
+        Support the toggle button type in iOS.
+
+        Test: platform/ios-sim/accessibility/toggle-button.html
+
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
+        (-[WebAccessibilityObjectWrapper accessibilityTraits]):
+        (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
+
 2014-07-01  Dean Jackson  <[email protected]>
 
         [iOS] Subsampled JPEG images do not draw correctly via the canvas APIs

Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (170677 => 170678)


--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2014-07-01 23:40:32 UTC (rev 170677)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2014-07-01 23:57:07 UTC (rev 170678)
@@ -301,6 +301,7 @@
     case StaticTextRole:
     case TabRole:
     case TextFieldRole:
+    case ToggleButtonRole:
         return !m_object->accessibilityIsIgnored();
     default:
         return false;
@@ -562,6 +563,7 @@
         case RadioButtonRole:
             traits |= [self _axRadioButtonTrait] | [self _axToggleTrait];
             break;
+        case ToggleButtonRole:
         case CheckBoxRole:
             traits |= ([self _axButtonTrait] | [self _axToggleTrait]);
             break;
@@ -623,6 +625,7 @@
         case TextFieldRole:
         case TextAreaRole:
         case ButtonRole:
+        case ToggleButtonRole:
         case PopUpButtonRole:
         case CheckBoxRole:
         case RadioButtonRole:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to