Title: [134465] trunk
- Revision
- 134465
- Author
- [email protected]
- Date
- 2012-11-13 12:30:10 -0800 (Tue, 13 Nov 2012)
Log Message
AX: file upload input text value is not exposed through accessibility
https://bugs.webkit.org/show_bug.cgi?id=100583
Reviewed by Beth Dakin.
Source/WebCore:
This is a hard problem to solve on the Mac because there are three pieces of information
1) The type of button 2) The text on the button 3) The text for the value.
I think the best compromise is to label this as a file upload button type in the role description,
and then expose the file path text as the AXTitle.
This will give the more relevant information and should be clear what is happening.
Test: platform/mac/accessibility/file-upload-button-subrole.html
* English.lproj/Localizable.strings:
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
(-[WebAccessibilityObjectWrapper accessibilityTitle]):
* platform/LocalizedStrings.cpp:
(WebCore::AXFileUploadButtonText):
* platform/LocalizedStrings.h:
LayoutTests:
* platform/mac/accessibility/file-upload-button-subrole-expected.txt: Added.
* platform/mac/accessibility/file-upload-button-subrole.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (134464 => 134465)
--- trunk/LayoutTests/ChangeLog 2012-11-13 20:17:55 UTC (rev 134464)
+++ trunk/LayoutTests/ChangeLog 2012-11-13 20:30:10 UTC (rev 134465)
@@ -1,3 +1,13 @@
+2012-11-13 Chris Fleizach <[email protected]>
+
+ AX: file upload input text value is not exposed through accessibility
+ https://bugs.webkit.org/show_bug.cgi?id=100583
+
+ Reviewed by Beth Dakin.
+
+ * platform/mac/accessibility/file-upload-button-subrole-expected.txt: Added.
+ * platform/mac/accessibility/file-upload-button-subrole.html: Added.
+
2012-11-13 Sheriff Bot <[email protected]>
Unreviewed, rolling out r133944.
Added: trunk/LayoutTests/platform/mac/accessibility/file-upload-button-subrole-expected.txt (0 => 134465)
--- trunk/LayoutTests/platform/mac/accessibility/file-upload-button-subrole-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/file-upload-button-subrole-expected.txt 2012-11-13 20:30:10 UTC (rev 134465)
@@ -0,0 +1,13 @@
+
+This tests that a file upload button will have a specific subrole and a title that matches the files selected.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS uploadButton.subrole is 'AXSubrole: AXFileUploadButton'
+PASS uploadButton.roleDescription is 'AXRoleDescription: file upload button'
+PASS uploadButton.title is 'AXTitle: no file selected'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/mac/accessibility/file-upload-button-subrole.html (0 => 134465)
--- trunk/LayoutTests/platform/mac/accessibility/file-upload-button-subrole.html (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/file-upload-button-subrole.html 2012-11-13 20:30:10 UTC (rev 134465)
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<input type="file" id="fileupload">
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that a file upload button will have a specific subrole and a title that matches the files selected.");
+
+ if (window.accessibilityController) {
+
+ var uploadButton = accessibilityController.accessibleElementById("fileupload");
+ shouldBe("uploadButton.subrole", "'AXSubrole: AXFileUploadButton'");
+ shouldBe("uploadButton.roleDescription", "'AXRoleDescription: file upload button'");
+ shouldBe("uploadButton.title", "'AXTitle: no file selected'");
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (134464 => 134465)
--- trunk/Source/WebCore/ChangeLog 2012-11-13 20:17:55 UTC (rev 134464)
+++ trunk/Source/WebCore/ChangeLog 2012-11-13 20:30:10 UTC (rev 134465)
@@ -1,3 +1,27 @@
+2012-11-13 Chris Fleizach <[email protected]>
+
+ AX: file upload input text value is not exposed through accessibility
+ https://bugs.webkit.org/show_bug.cgi?id=100583
+
+ Reviewed by Beth Dakin.
+
+ This is a hard problem to solve on the Mac because there are three pieces of information
+ 1) The type of button 2) The text on the button 3) The text for the value.
+ I think the best compromise is to label this as a file upload button type in the role description,
+ and then expose the file path text as the AXTitle.
+ This will give the more relevant information and should be clear what is happening.
+
+ Test: platform/mac/accessibility/file-upload-button-subrole.html
+
+ * English.lproj/Localizable.strings:
+ * accessibility/mac/WebAccessibilityObjectWrapper.mm:
+ (-[WebAccessibilityObjectWrapper subrole]):
+ (-[WebAccessibilityObjectWrapper roleDescription]):
+ (-[WebAccessibilityObjectWrapper accessibilityTitle]):
+ * platform/LocalizedStrings.cpp:
+ (WebCore::AXFileUploadButtonText):
+ * platform/LocalizedStrings.h:
+
2012-11-13 Sheriff Bot <[email protected]>
Unreviewed, rolling out r133944.
Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (134464 => 134465)
--- trunk/Source/WebCore/English.lproj/Localizable.strings 2012-11-13 20:17:55 UTC (rev 134464)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings 2012-11-13 20:30:10 UTC (rev 134465)
@@ -616,6 +616,9 @@
/ * a c c e s s i b i l i t y r o l e d e s c r i p t i o n f o r f a s t r e v e r s e b u t t o n * /
"