Title: [135680] trunk
Revision
135680
Author
[email protected]
Date
2012-11-25 22:07:47 -0800 (Sun, 25 Nov 2012)

Log Message

AX: file upload input cannot be activated with VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=100343

Reviewed by Sam Weinig.

Source/WebCore: 

Simulated events were not allowed to be processed in the file input type in the DOMActivate handler.
This was a problem for accessibility clients which rely on simulated events.

The solution is to mark the UserGestureIndicator as definitely processing an event.

Test: accessibility/file-upload-button-with-axpress.html

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

LayoutTests: 

* accessibility/file-upload-button-with-axpress-expected.txt: Added.
* accessibility/file-upload-button-with-axpress.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (135679 => 135680)


--- trunk/LayoutTests/ChangeLog	2012-11-26 05:58:39 UTC (rev 135679)
+++ trunk/LayoutTests/ChangeLog	2012-11-26 06:07:47 UTC (rev 135680)
@@ -1,3 +1,13 @@
+2012-11-25  Chris Fleizach  <[email protected]>
+
+        AX: file upload input cannot be activated with VoiceOver
+        https://bugs.webkit.org/show_bug.cgi?id=100343
+
+        Reviewed by Sam Weinig.
+
+        * accessibility/file-upload-button-with-axpress-expected.txt: Added.
+        * accessibility/file-upload-button-with-axpress.html: Added.
+
 2012-11-25  Kent Tamura  <[email protected]>
 
         [Chromium] Fix svn:mime-type for images

Added: trunk/LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt (0 => 135680)


--- trunk/LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/file-upload-button-with-axpress-expected.txt	2012-11-26 06:07:47 UTC (rev 135680)
@@ -0,0 +1,10 @@
+
+This tests that when AXPress is used DOMActivate will be handled by the input file type.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+DOMActivate was called
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/accessibility/file-upload-button-with-axpress.html (0 => 135680)


--- trunk/LayoutTests/accessibility/file-upload-button-with-axpress.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/file-upload-button-with-axpress.html	2012-11-26 06:07:47 UTC (rev 135680)
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<script src=""
+
+<input id="filetype" type="file">
+
+<div id="description"></div>
+<div id="console"></div>
+
+<script>
+
+description("This tests that when AXPress is used DOMActivate will be handled by the input file type.")
+
+if (window.testRunner && window.accessibilityController) {
+    window.testRunner.waitUntilDone();
+    
+    var inputFile = document.getElementById("filetype");
+
+    inputFile.addEventListener("DOMActivate", function() { 
+        debug("DOMActivate was called"); 
+        window.testRunner.notifyDone(); 
+    });
+
+    accessibilityController.accessibleElementById("filetype").press();
+}
+
+</script>
+
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (135679 => 135680)


--- trunk/Source/WebCore/ChangeLog	2012-11-26 05:58:39 UTC (rev 135679)
+++ trunk/Source/WebCore/ChangeLog	2012-11-26 06:07:47 UTC (rev 135680)
@@ -1,3 +1,20 @@
+2012-11-25  Chris Fleizach  <[email protected]>
+
+        AX: file upload input cannot be activated with VoiceOver
+        https://bugs.webkit.org/show_bug.cgi?id=100343
+
+        Reviewed by Sam Weinig.
+
+        Simulated events were not allowed to be processed in the file input type in the DOMActivate handler.
+        This was a problem for accessibility clients which rely on simulated events.
+
+        The solution is to mark the UserGestureIndicator as definitely processing an event.
+
+        Test: accessibility/file-upload-button-with-axpress.html
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::press):
+
 2012-11-25  Nikita Vasilyev  <[email protected]>
 
         Web Inspector: dispatch an event upon heap snapshot filter change

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (135679 => 135680)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2012-11-26 05:58:39 UTC (rev 135679)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2012-11-26 06:07:47 UTC (rev 135680)
@@ -55,6 +55,7 @@
 #include "TextCheckerClient.h"
 #include "TextCheckingHelper.h"
 #include "TextIterator.h"
+#include "UserGestureIndicator.h"
 #include "htmlediting.h"
 #include "visible_units.h"
 #include <wtf/StdLibExtras.h>
@@ -540,6 +541,8 @@
         return false;
     if (Frame* f = actionElem->document()->frame())
         f->loader()->resetMultipleFormSubmissionProtection();
+    
+    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
     actionElem->accessKeyAction(true);
     return true;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to