Title: [147660] trunk
- Revision
- 147660
- Author
- [email protected]
- Date
- 2013-04-04 12:05:22 -0700 (Thu, 04 Apr 2013)
Log Message
AX:File upload button has wrong label
https://bugs.webkit.org/show_bug.cgi?id=113924
Reviewed by David Kilzer.
Source/WebCore:
Allow the label and value to be returned for file upload controls on iOS.
Due to the different AX APIs, we can expose a bit more information on iOS.
Test: platform/iphone-simulator/accessibility/file-upload-button.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
(-[WebAccessibilityObjectWrapper fileUploadButtonReturnsValueInTitle]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase fileUploadButtonReturnsValueInTitle]):
(-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
LayoutTests:
* platform/iphone-simulator/accessibility/file-upload-button-expected.txt: Added.
* platform/iphone-simulator/accessibility/file-upload-button.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (147659 => 147660)
--- trunk/LayoutTests/ChangeLog 2013-04-04 18:52:27 UTC (rev 147659)
+++ trunk/LayoutTests/ChangeLog 2013-04-04 19:05:22 UTC (rev 147660)
@@ -1,3 +1,13 @@
+2013-04-04 Chris Fleizach <[email protected]>
+
+ AX:File upload button has wrong label
+ https://bugs.webkit.org/show_bug.cgi?id=113924
+
+ Reviewed by David Kilzer.
+
+ * platform/iphone-simulator/accessibility/file-upload-button-expected.txt: Added.
+ * platform/iphone-simulator/accessibility/file-upload-button.html: Added.
+
2013-04-04 Emil A Eklund <[email protected]>
Change RenderFrameSet::computeEdgeInfo to use m-rows/m_cols directly
Added: trunk/LayoutTests/platform/iphone-simulator/accessibility/file-upload-button-expected.txt (0 => 147660)
--- trunk/LayoutTests/platform/iphone-simulator/accessibility/file-upload-button-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/iphone-simulator/accessibility/file-upload-button-expected.txt 2013-04-04 19:05:22 UTC (rev 147660)
@@ -0,0 +1,12 @@
+
+This tests that the label and value are correct for input file types.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS button1.iphoneLabel is 'AXLabel: Choose File'
+PASS button1.iphoneValue is 'AXValue: no file selected'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/iphone-simulator/accessibility/file-upload-button.html (0 => 147660)
--- trunk/LayoutTests/platform/iphone-simulator/accessibility/file-upload-button.html (rev 0)
+++ trunk/LayoutTests/platform/iphone-simulator/accessibility/file-upload-button.html 2013-04-04 19:05:22 UTC (rev 147660)
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script src=""
+<script>
+var successfullyParsed = false;
+</script>
+</head>
+<body id="body">
+
+<input id="file-input" type="file"/>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests that the label and value are correct for input file types.");
+
+ if (window.accessibilityController) {
+
+ var button1 = accessibilityController.accessibleElementById("file-input");
+ shouldBe("button1.iphoneLabel", "'AXLabel: Choose File'");
+ shouldBe("button1.iphoneValue", "'AXValue: no file selected'");
+ }
+
+ successfullyParsed = true;
+</script>
+
+<script src=""
+
+</body>
+</html>
+
Modified: trunk/Source/WebCore/ChangeLog (147659 => 147660)
--- trunk/Source/WebCore/ChangeLog 2013-04-04 18:52:27 UTC (rev 147659)
+++ trunk/Source/WebCore/ChangeLog 2013-04-04 19:05:22 UTC (rev 147660)
@@ -1,3 +1,22 @@
+2013-04-04 Chris Fleizach <[email protected]>
+
+ AX:File upload button has wrong label
+ https://bugs.webkit.org/show_bug.cgi?id=113924
+
+ Reviewed by David Kilzer.
+
+ Allow the label and value to be returned for file upload controls on iOS.
+ Due to the different AX APIs, we can expose a bit more information on iOS.
+
+ Test: platform/iphone-simulator/accessibility/file-upload-button.html
+
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
+ (-[WebAccessibilityObjectWrapper fileUploadButtonReturnsValueInTitle]):
+ * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
+ (-[WebAccessibilityObjectWrapperBase fileUploadButtonReturnsValueInTitle]):
+ (-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
+
2013-04-03 Dean Jackson <[email protected]>
Expose settings to disable plugin snapshotting autostart and primary detection
Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (147659 => 147660)
--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2013-04-04 18:52:27 UTC (rev 147659)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm 2013-04-04 19:05:22 UTC (rev 147660)
@@ -658,10 +658,17 @@
return NO;
if (m_object->roleValue() == PopUpButtonRole)
return NO;
+ if (m_object->isFileUploadButton())
+ return NO;
return YES;
}
+- (BOOL)fileUploadButtonReturnsValueInTitle
+{
+ return NO;
+}
+
- (NSString *)accessibilityLabel
{
if (![self _prepareAccessibilityCall])
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm (147659 => 147660)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm 2013-04-04 18:52:27 UTC (rev 147659)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm 2013-04-04 19:05:22 UTC (rev 147660)
@@ -127,6 +127,12 @@
return (m_object->isLink() && !m_object->isImageMapLink()) || m_object->isImage();
}
+// On iOS, we don't have to return the value in the title. We can return the actual title, given the API.
+- (BOOL)fileUploadButtonReturnsValueInTitle
+{
+ return YES;
+}
+
// This should be the "visible" text that's actually on the screen if possible.
// If there's alternative text, that can override the title.
- (NSString *)accessibilityTitle
@@ -138,7 +144,7 @@
// A file upload button presents a challenge because it has button text and a value, but the
// API doesn't support this paradigm.
// The compromise is to return the button type in the role description and the value of the file path in the title
- if (m_object->isFileUploadButton())
+ if (m_object->isFileUploadButton() && [self fileUploadButtonReturnsValueInTitle])
return m_object->stringValue();
Vector<AccessibilityText> textOrder;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes