Title: [122981] trunk
Revision
122981
Author
[email protected]
Date
2012-07-18 09:36:47 -0700 (Wed, 18 Jul 2012)

Log Message

AX: <input type="submit"> unlabelled.
https://bugs.webkit.org/show_bug.cgi?id=91563

Reviewed by Adele Peterson.

Source/WebCore: 

Make sure the default value is returned if there is no other value specified.

Test: platform/mac/accessibility/submit-button-default-value.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::title):

LayoutTests: 

* platform/mac/accessibility/submit-button-default-value-expected.txt: Added.
* platform/mac/accessibility/submit-button-default-value.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (122980 => 122981)


--- trunk/LayoutTests/ChangeLog	2012-07-18 16:34:11 UTC (rev 122980)
+++ trunk/LayoutTests/ChangeLog	2012-07-18 16:36:47 UTC (rev 122981)
@@ -1,3 +1,13 @@
+2012-07-18  Chris Fleizach  <[email protected]>
+
+        AX: <input type="submit"> unlabelled.
+        https://bugs.webkit.org/show_bug.cgi?id=91563
+
+        Reviewed by Adele Peterson.
+
+        * platform/mac/accessibility/submit-button-default-value-expected.txt: Added.
+        * platform/mac/accessibility/submit-button-default-value.html: Added.
+
 2012-07-17  Shawn Singh  <[email protected]>
 
         [chromium] Remove awkward anchorPoint usage that implicity affects layer position

Added: trunk/LayoutTests/platform/mac/accessibility/submit-button-default-value-expected.txt (0 => 122981)


--- trunk/LayoutTests/platform/mac/accessibility/submit-button-default-value-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/submit-button-default-value-expected.txt	2012-07-18 16:36:47 UTC (rev 122981)
@@ -0,0 +1,12 @@
+  
+This tests that a submit button will return its default value as the title.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS button.title is 'AXTitle: Submit'
+PASS button.title is 'AXTitle: non-default value'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/platform/mac/accessibility/submit-button-default-value.html (0 => 122981)


--- trunk/LayoutTests/platform/mac/accessibility/submit-button-default-value.html	                        (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/submit-button-default-value.html	2012-07-18 16:36:47 UTC (rev 122981)
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script>
+var successfullyParsed = false;
+</script>
+<script src=""
+</head>
+<body id="body">
+
+<input type="submit" tabindex="0" id="submitButton1">
+
+<input type="submit" tabindex="0" id="submitButton2" value="non-default value">
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests that a submit button will return its default value as the title.");
+
+    if (window.accessibilityController) {
+
+        document.getElementById("submitButton1").focus();
+        var button = accessibilityController.focusedElement;
+        shouldBe("button.title", "'AXTitle: Submit'");
+
+        document.getElementById("submitButton2").focus();
+        button = accessibilityController.focusedElement;
+        shouldBe("button.title", "'AXTitle: non-default value'");
+    }
+
+    successfullyParsed = true;
+</script>
+
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (122980 => 122981)


--- trunk/Source/WebCore/ChangeLog	2012-07-18 16:34:11 UTC (rev 122980)
+++ trunk/Source/WebCore/ChangeLog	2012-07-18 16:36:47 UTC (rev 122981)
@@ -1,3 +1,17 @@
+2012-07-18  Chris Fleizach  <[email protected]>
+
+        AX: <input type="submit"> unlabelled.
+        https://bugs.webkit.org/show_bug.cgi?id=91563
+
+        Reviewed by Adele Peterson.
+
+        Make sure the default value is returned if there is no other value specified.
+
+        Test: platform/mac/accessibility/submit-button-default-value.html
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::title):
+
 2012-07-17  Shawn Singh  <[email protected]>
 
         [chromium] Remove awkward anchorPoint usage that implicity affects layer position

Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (122980 => 122981)


--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2012-07-18 16:34:11 UTC (rev 122980)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2012-07-18 16:36:47 UTC (rev 122981)
@@ -1363,7 +1363,7 @@
     if (isInputTag) {
         HTMLInputElement* input = static_cast<HTMLInputElement*>(node);
         if (input->isTextButton())
-            return input->value();
+            return input->valueWithDefault();
     }
     
     if (isInputTag || AccessibilityObject::isARIAInput(ariaRoleAttribute()) || isControl()) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to