AX: file upload input text value is not exposed through accessibility
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2012 20:30:10 +0000 (20:30 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2012 20:30:10 +0000 (20:30 +0000)
commit799868d04aaf7249167cdcfa7f6bc7e5a59da176
tree1c0098d4876fd920bca9ba59e9a84e541695d096
parent55e4a74c6907927bcd6774a77876b41773f973bc
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/file-upload-button-subrole-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/file-upload-button-subrole.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/LocalizedStrings.h