Title: [158193] trunk
Revision
158193
Author
[email protected]
Date
2013-10-29 09:01:17 -0700 (Tue, 29 Oct 2013)

Log Message

AX: Webkit does not expose AXRequired on input type=file
https://bugs.webkit.org/show_bug.cgi?id=123376

Reviewed by Mario Sanchez Prada.

Source/WebCore: 

File upload buttons should expose AXRequired, since they take an input state.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
(WebCore::AccessibilityNodeObject::alternativeText):

LayoutTests: 

Modify existing test case to test for file upload buttons.

* accessibility/html5-required-attribute-expected.txt:
* accessibility/html5-required-attribute.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (158192 => 158193)


--- trunk/LayoutTests/ChangeLog	2013-10-29 12:42:21 UTC (rev 158192)
+++ trunk/LayoutTests/ChangeLog	2013-10-29 16:01:17 UTC (rev 158193)
@@ -1,3 +1,15 @@
+2013-10-28  Chris Fleizach  <[email protected]>
+
+        AX: Webkit does not expose AXRequired on input type=file
+        https://bugs.webkit.org/show_bug.cgi?id=123376
+
+        Reviewed by Mario Sanchez Prada.
+
+        Modify existing test case to test for file upload buttons.
+
+        * accessibility/html5-required-attribute-expected.txt:
+        * accessibility/html5-required-attribute.html:
+
 2013-10-29  Santosh Mahto  <[email protected]>
 
         Text selected with double-click gets unselected after DOM modification

Modified: trunk/LayoutTests/accessibility/html5-required-attribute-expected.txt (158192 => 158193)


--- trunk/LayoutTests/accessibility/html5-required-attribute-expected.txt	2013-10-29 12:42:21 UTC (rev 158192)
+++ trunk/LayoutTests/accessibility/html5-required-attribute-expected.txt	2013-10-29 16:01:17 UTC (rev 158193)
@@ -1,4 +1,4 @@
-
+ 
 This tests that the required attribute is returned correctly through accessibility.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -6,6 +6,7 @@
 
 PASS accessibilityController.focusedElement.isRequired is true
 PASS accessibilityController.focusedElement.isRequired is false
+PASS fileUpload.isRequired is true
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/accessibility/html5-required-attribute.html (158192 => 158193)


--- trunk/LayoutTests/accessibility/html5-required-attribute.html	2013-10-29 12:42:21 UTC (rev 158192)
+++ trunk/LayoutTests/accessibility/html5-required-attribute.html	2013-10-29 16:01:17 UTC (rev 158193)
@@ -7,6 +7,7 @@
 
 
 <input type="text" id="text1" required>
+<input type="file" id="file" required>
 
 <p id="description"></p>
 <div id="console"></div>
@@ -23,6 +24,8 @@
         document.getElementById("text1").removeAttribute("required");
         shouldBeFalse("accessibilityController.focusedElement.isRequired");
 
+        var fileUpload = accessibilityController.accessibleElementById("file");
+        shouldBeTrue("fileUpload.isRequired");
     }
 
 </script>

Modified: trunk/Source/WebCore/ChangeLog (158192 => 158193)


--- trunk/Source/WebCore/ChangeLog	2013-10-29 12:42:21 UTC (rev 158192)
+++ trunk/Source/WebCore/ChangeLog	2013-10-29 16:01:17 UTC (rev 158193)
@@ -1,3 +1,16 @@
+2013-10-28  Chris Fleizach  <[email protected]>
+
+        AX: Webkit does not expose AXRequired on input type=file
+        https://bugs.webkit.org/show_bug.cgi?id=123376
+
+        Reviewed by Mario Sanchez Prada.
+
+        File upload buttons should expose AXRequired, since they take an input state.
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
+        (WebCore::AccessibilityNodeObject::alternativeText):
+
 2013-10-29  Jinwoo Song  <[email protected]>
 
         Re-enable simple line layout for EFL

Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (158192 => 158193)


--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2013-10-29 12:42:21 UTC (rev 158192)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2013-10-29 16:01:17 UTC (rev 158193)
@@ -742,6 +742,8 @@
 bool AccessibilityNodeObject::supportsRequiredAttribute() const
 {
     switch (roleValue()) {
+    case ButtonRole:
+        return isFileUploadButton();
     case CellRole:
     case CheckBoxRole:
     case ComboBoxRole:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to