RESOLVED FIXED 111222
AX: aria-label does not override text content on iOS
https://bugs.webkit.org/show_bug.cgi?id=111222
Summary AX: aria-label does not override text content on iOS
chris fleizach
Reported 2013-03-01 14:35:15 PST
iOS needs to use the text alternative computation rules already being used by the Mac
Attachments
patch (6.24 KB, patch)
2013-03-01 15:02 PST, chris fleizach
ddkilzer: review+
chris fleizach
Comment 1 2013-03-01 15:02:06 PST
David Kilzer (:ddkilzer)
Comment 2 2013-03-04 15:16:23 PST
Comment on attachment 191046 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=191046&action=review r=me, but consider expanding the layout test to cover all four scenarios if possible. > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:685 > + if ([axTitle length] && [axDescription length]) > + return [axTitle stringByAppendingFormat:@", %@", axDescription]; > + else if ([axTitle length]) > + return axTitle; > + else if ([axDescription length]) > + return axDescription; Nit: Might be worth pulling [axTitle length] and [axDescription length] into local variables since they're used multiple times here. > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:687 > + else if ([self stringValueShouldBeUsedInLabel]) > + return m_object->stringValue(); Also, is it possible to test all of these code paths (title and description, title only, description only, neither) using a layout test? If so, the layout test should be changed to test all four scenarios.
chris fleizach
Comment 3 2013-03-04 15:29:20 PST
(In reply to comment #2) > (From update of attachment 191046 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=191046&action=review > > r=me, but consider expanding the layout test to cover all four scenarios if possible. > > > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:685 > > + if ([axTitle length] && [axDescription length]) > > + return [axTitle stringByAppendingFormat:@", %@", axDescription]; > > + else if ([axTitle length]) > > + return axTitle; > > + else if ([axDescription length]) > > + return axDescription; > > Nit: Might be worth pulling [axTitle length] and [axDescription length] into local variables since they're used multiple times here. > > > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:687 > > + else if ([self stringValueShouldBeUsedInLabel]) > > + return m_object->stringValue(); > > Also, is it possible to test all of these code paths (title and description, title only, description only, neither) using a layout test? > > If so, the layout test should be changed to test all four scenarios. Yep, I'll fix up this layout test to test all 4 scenarios. Thanks!
chris fleizach
Comment 4 2013-03-05 09:28:20 PST
Note You need to log in before you can comment on or make changes to this bug.