Title: [206170] trunk
Revision
206170
Author
n_w...@apple.com
Date
2016-09-20 13:44:26 -0700 (Tue, 20 Sep 2016)

Log Message

AX: voiceover does not read contents of input role="spinbutton"
https://bugs.webkit.org/show_bug.cgi?id=162137

Reviewed by Chris Fleizach.

Source/WebCore:

The aria-valuenow attribute value on the spinbutton is not exposed
on iOS. We should expose aria-valuenow attribute for range controls
based on https://www.w3.org/TR/wai-aria/states_and_properties#aria-valuenow

Changes are covered in the modified test.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityValue]):

LayoutTests:

* accessibility/ios-simulator/spinbutton-expected.txt:
* accessibility/ios-simulator/spinbutton.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (206169 => 206170)


--- trunk/LayoutTests/ChangeLog	2016-09-20 20:25:03 UTC (rev 206169)
+++ trunk/LayoutTests/ChangeLog	2016-09-20 20:44:26 UTC (rev 206170)
@@ -1,3 +1,13 @@
+2016-09-20  Nan Wang  <n_w...@apple.com>
+
+        AX: voiceover does not read contents of input role="spinbutton"
+        https://bugs.webkit.org/show_bug.cgi?id=162137
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/ios-simulator/spinbutton-expected.txt:
+        * accessibility/ios-simulator/spinbutton.html:
+
 2016-09-20  Alex Christensen  <achristen...@webkit.org>
 
         Non-special URLs should have an opaque origin

Modified: trunk/LayoutTests/accessibility/ios-simulator/spinbutton-expected.txt (206169 => 206170)


--- trunk/LayoutTests/accessibility/ios-simulator/spinbutton-expected.txt	2016-09-20 20:25:03 UTC (rev 206169)
+++ trunk/LayoutTests/accessibility/ios-simulator/spinbutton-expected.txt	2016-09-20 20:44:26 UTC (rev 206170)
@@ -1,4 +1,5 @@
 button
+
 This test makes sure that spinbuttons appear.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -6,6 +7,7 @@
 
 PASS button.description is 'AXLabel: spinner'
 PASS button.isIgnored is false
+PASS button2.stringValue is 'AXValue: 5.00'
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/accessibility/ios-simulator/spinbutton.html (206169 => 206170)


--- trunk/LayoutTests/accessibility/ios-simulator/spinbutton.html	2016-09-20 20:25:03 UTC (rev 206169)
+++ trunk/LayoutTests/accessibility/ios-simulator/spinbutton.html	2016-09-20 20:44:26 UTC (rev 206170)
@@ -11,6 +11,7 @@
 <body>
 
 <div id="fakeButton" tabindex=0 role="spinbutton" aria-label="spinner">button</div>
+<input id="spinner" name="spinner" value="5" aria-valuenow="5" autocomplete="off" role="spinbutton">
 
 <p id="description"></p>
 <div id="console"></div>
@@ -24,6 +25,10 @@
         var button = accessibilityController.accessibleElementById("fakeButton");
         shouldBe("button.description", "'AXLabel: spinner'");
         shouldBeFalse("button.isIgnored");
+        
+        // Test the aria-valuenow attribute on the spinbutton.
+        var button2 = accessibilityController.accessibleElementById("spinner");
+        shouldBe("button2.stringValue", "'AXValue: 5.00'");
     }
 
     successfullyParsed = true;

Modified: trunk/Source/WebCore/ChangeLog (206169 => 206170)


--- trunk/Source/WebCore/ChangeLog	2016-09-20 20:25:03 UTC (rev 206169)
+++ trunk/Source/WebCore/ChangeLog	2016-09-20 20:44:26 UTC (rev 206170)
@@ -1,3 +1,19 @@
+2016-09-20  Nan Wang  <n_w...@apple.com>
+
+        AX: voiceover does not read contents of input role="spinbutton"
+        https://bugs.webkit.org/show_bug.cgi?id=162137
+
+        Reviewed by Chris Fleizach.
+
+        The aria-valuenow attribute value on the spinbutton is not exposed
+        on iOS. We should expose aria-valuenow attribute for range controls
+        based on https://www.w3.org/TR/wai-aria/states_and_properties#aria-valuenow
+
+        Changes are covered in the modified test.
+
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityValue]):
+
 2016-09-20  Michael Catanzaro  <mcatanz...@igalia.com>
 
         URLParser: uidna_IDNToASCII_56 is deprecated

Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (206169 => 206170)


--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2016-09-20 20:25:03 UTC (rev 206169)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm	2016-09-20 20:44:26 UTC (rev 206170)
@@ -1297,7 +1297,7 @@
     if (![self stringValueShouldBeUsedInLabel])
         return m_object->stringValue();
     
-    if (m_object->isProgressIndicator() || m_object->isSlider()) {
+    if (m_object->isRangeControl()) {
         // Prefer a valueDescription if provided by the author (through aria-valuetext).
         String valueDescription = m_object->valueDescription();
         if (!valueDescription.isEmpty())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to