Title: [189862] trunk
Revision
189862
Author
cfleiz...@apple.com
Date
2015-09-16 08:02:46 -0700 (Wed, 16 Sep 2015)

Log Message

Source/WebCore:
AX: No VoiceOver typing feedback in some search fields
https://bugs.webkit.org/show_bug.cgi?id=149177

Reviewed by Mario Sanchez Prada.

If SearchFieldRole is not marked as a TextControl, it does not end up returning the accessibilityValue,
which is needed to output the right text to VoiceOver.

Test: accessibility/ax-value-with-search.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isTextControl):

LayoutTests:
AX: No VO typing feedback in some text fields
https://bugs.webkit.org/show_bug.cgi?id=149177

Reviewed by Mario Sanchez Prada.

* accessibility/ax-value-with-search-expected.txt: Added.
* accessibility/ax-value-with-search.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (189861 => 189862)


--- trunk/LayoutTests/ChangeLog	2015-09-16 12:48:38 UTC (rev 189861)
+++ trunk/LayoutTests/ChangeLog	2015-09-16 15:02:46 UTC (rev 189862)
@@ -1,3 +1,13 @@
+2015-09-16  Chris Fleizach  <cfleiz...@apple.com>
+
+        AX: No VO typing feedback in some text fields
+        https://bugs.webkit.org/show_bug.cgi?id=149177
+
+        Reviewed by Mario Sanchez Prada.
+
+        * accessibility/ax-value-with-search-expected.txt: Added.
+        * accessibility/ax-value-with-search.html: Added.
+
 2015-09-16  Manuel Rego Casasnovas  <r...@igalia.com>
 
         [css-grid] Grid container's height should include scrollbar

Added: trunk/LayoutTests/accessibility/ax-value-with-search-expected.txt (0 => 189862)


--- trunk/LayoutTests/accessibility/ax-value-with-search-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/ax-value-with-search-expected.txt	2015-09-16 15:02:46 UTC (rev 189862)
@@ -0,0 +1,12 @@
+
+This tests that a search field is returns its accessibilityValue correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS search.stringValue is 'AXValue: hello'
+PASS search.stringValue is 'AXValue: test'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/accessibility/ax-value-with-search.html (0 => 189862)


--- trunk/LayoutTests/accessibility/ax-value-with-search.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/ax-value-with-search.html	2015-09-16 15:02:46 UTC (rev 189862)
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<input type="search" value="hello" id="search">
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests that a search field is returns its accessibilityValue correctly.");
+
+    if (window.accessibilityController) {
+
+        var search = accessibilityController.accessibleElementById("search");
+        shouldBe("search.stringValue", "'AXValue: hello'");
+        document.getElementById('search').value = 'test';
+        shouldBe("search.stringValue", "'AXValue: test'");
+    }
+
+</script>
+
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (189861 => 189862)


--- trunk/Source/WebCore/ChangeLog	2015-09-16 12:48:38 UTC (rev 189861)
+++ trunk/Source/WebCore/ChangeLog	2015-09-16 15:02:46 UTC (rev 189862)
@@ -1,3 +1,18 @@
+2015-09-16  Chris Fleizach  <cfleiz...@apple.com>
+
+        AX: No VoiceOver typing feedback in some search fields
+        https://bugs.webkit.org/show_bug.cgi?id=149177
+
+        Reviewed by Mario Sanchez Prada.
+
+        If SearchFieldRole is not marked as a TextControl, it does not end up returning the accessibilityValue,
+        which is needed to output the right text to VoiceOver.
+
+        Test: accessibility/ax-value-with-search.html
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::isTextControl):
+
 2015-09-16  Manuel Rego Casasnovas  <r...@igalia.com>
 
         [css-grid] Grid container's height should include scrollbar

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (189861 => 189862)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2015-09-16 12:48:38 UTC (rev 189861)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2015-09-16 15:02:46 UTC (rev 189862)
@@ -376,9 +376,10 @@
 bool AccessibilityObject::isTextControl() const
 {
     switch (roleValue()) {
+    case ComboBoxRole:
+    case SearchFieldRole:
     case TextAreaRole:
     case TextFieldRole:
-    case ComboBoxRole:
         return true;
     default:
         return false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to