RESOLVED FIXED 106349
AX: native popup buttons should not use textUnderElement for their title
https://bugs.webkit.org/show_bug.cgi?id=106349
Summary AX: native popup buttons should not use textUnderElement for their title
chris fleizach
Reported 2013-01-08 10:59:35 PST
Native pop up buttons (<select>) should not use textUnderElement for their visibleText/title. That's because that would cause the title to be the value of the pop up button. We want to communicate that info through stringValue(), not the title
Attachments
patch (1.72 KB, patch)
2013-01-08 11:17 PST, chris fleizach
webkit-ews: commit-queue-
patch (1.71 KB, patch)
2013-01-08 11:33 PST, chris fleizach
rniwa: review+
patch for chromium layout test fix (1.57 KB, patch)
2013-01-09 00:18 PST, chris fleizach
rniwa: review+
chris fleizach
Comment 1 2013-01-08 11:17:41 PST
Dominic Mazzoni
Comment 2 2013-01-08 11:23:35 PST
Comment on attachment 181714 [details] patch Unofficial review. View in context: https://bugs.webkit.org/attachment.cgi?id=181714&action=review > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1196 > + if (renderer() && renderer()->isMenuList()) This should work for elements without a renderer (like in canvas fallback content, or in a region of the page that's hidden from sighted users but has aria-hidden=false). Instead of checking renderer()->isMenuList(), check if it's a select element and if it has multiple or not. There's already similar code in this file. If there are cases where a rendered popup button is different than an unrendered one, you could override it in AccessibilityRenderObject - but I don't think you need to in this case.
Early Warning System Bot
Comment 3 2013-01-08 11:24:26 PST
Early Warning System Bot
Comment 4 2013-01-08 11:26:28 PST
chris fleizach
Comment 5 2013-01-08 11:26:43 PST
(In reply to comment #2) > (From update of attachment 181714 [details]) > Unofficial review. > > View in context: https://bugs.webkit.org/attachment.cgi?id=181714&action=review > > > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1196 > > + if (renderer() && renderer()->isMenuList()) > > This should work for elements without a renderer (like in canvas fallback content, or in a region of the page that's hidden from sighted users but has aria-hidden=false). Instead of checking renderer()->isMenuList(), check if it's a select element and if it has multiple or not. There's already similar code in this file. i think we want this to apply for multiple and non-multiple. what do you think > > If there are cases where a rendered popup button is different than an unrendered one, you could override it in AccessibilityRenderObject - but I don't think you need to in this case.
Dominic Mazzoni
Comment 6 2013-01-08 11:30:35 PST
(In reply to comment #5) > > This should work for elements without a renderer (like in canvas fallback content, or in a region of the page that's hidden from sighted users but has aria-hidden=false). Instead of checking renderer()->isMenuList(), check if it's a select element and if it has multiple or not. There's already similar code in this file. > > i think we want this to apply for multiple and non-multiple. what do you think I think you're right, but then I'd like both to be covered by tests.
chris fleizach
Comment 7 2013-01-08 11:32:32 PST
(In reply to comment #6) > (In reply to comment #5) > > > This should work for elements without a renderer (like in canvas fallback content, or in a region of the page that's hidden from sighted users but has aria-hidden=false). Instead of checking renderer()->isMenuList(), check if it's a select element and if it has multiple or not. There's already similar code in this file. > > > > i think we want this to apply for multiple and non-multiple. what do you think > > I think you're right, but then I'd like both to be covered by tests. It looks like they are <select id="combobox1"><option>1<option selected>2</select> <select multiple id="listbox1"><option>1<option selected>2</select>
chris fleizach
Comment 8 2013-01-08 11:33:47 PST
Dominic Mazzoni
Comment 9 2013-01-08 11:36:28 PST
Looks fine to me.
chris fleizach
Comment 10 2013-01-08 11:54:25 PST
Ryosuke Niwa
Comment 12 2013-01-08 14:26:37 PST
noel gordon
Comment 13 2013-01-08 18:44:42 PST
The failure is due to changes in ax title rendering (aka this bug and related). combobox1 PASS document.activeElement == element1 is true1 combobox2 PASS document.activeElement == element2 is true PASS axElement2.role is axElement1.role PASS axElement2.roleDescription is axElement1.roleDescription FAIL axElement2.title should be AXTitle: 2. Was AXTitle: . PASS axElement2.description is axElement1.description PASS axElement2.helpText is axElement1.helpText PASS axElement2.stringValue is axElement1.stringValue PASS axElement2.isEnabled is axElement1.isEnabled PASS axElement2.isRequired is axElement1.isRequired PASS axElement2.isChecked is axElement1.isChecked PASS axElement2.intValue is axElement1.intValue PASS axElement2.minValue is axElement1.minValue PASS axElement2.maxValue is axElement1.maxValue
noel gordon
Comment 14 2013-01-08 18:45:51 PST
And the green cr-linux bubble was trying to warn you about it. Regressions: Unexpected text-only failures (1) accessibility/canvas-fallback-content-2.html [ Failure ]
chris fleizach
Comment 15 2013-01-09 00:18:53 PST
Created attachment 181867 [details] patch for chromium layout test fix
noel gordon
Comment 16 2013-01-09 01:07:21 PST
lgtm: accessibility/canvas-fallback-content-2.html passes for me on chrome mac with this change.
chris fleizach
Comment 17 2013-01-09 07:57:36 PST
Note You need to log in before you can comment on or make changes to this bug.