The logic that determines accessibility roles for different HTML tokens does the wrong thing for <li> elements that have been given the "-webkit-box" display style. List items should be assigned the "ListItemRole" Web Role, but are instead given a "GroupingRole".
<rdar://problem/9524530>
Created attachment 204840 [details] This patch includes some unintended changes. Do not bother reviewing.
Created attachment 204842 [details] Patch
Comment on attachment 204842 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=204842&action=review looking good. i would suggest updating the layout test to make it more specific. > LayoutTests/accessibility/box-styled-lists.html:46 > + var bodyElement = document.getElementById("body"); I try to avoid the attributesofChildren() method these days because it's not very specific if something breaks. For this test I would probably do var listItem = document.accessibleElementById("test 1"); shouldBe("listeItem.role", "'AXRole: AX...'");
(In reply to comment #4) > (From update of attachment 204842 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=204842&action=review > > var listItem = document.accessibleElementById("test 1"); > shouldBe("listeItem.role", "'AXRole: AX...'"); I looked at using this, but I'd have to have a custom test for mac and one for windows, since it would be: Mac: shouldBe("listItem.role", "'AXRole: AX...'"); Win: shouldBe("listItem.role", "'list item'"); and so forth. But I'll definitely change the "attributesOfChildren()" call to "accessibleElementById()".
Comment on attachment 204842 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=204842&action=review >> LayoutTests/accessibility/box-styled-lists.html:46 >> + var bodyElement = document.getElementById("body"); > > I try to avoid the attributesofChildren() method these days because it's not very specific if something breaks. > > For this test I would probably do > > var listItem = document.accessibleElementById("test 1"); > shouldBe("listeItem.role", "'AXRole: AX...'"); I've also done debug("List item role: " + listItem.role) so that you can just use different expectations
Committed r151665: <http://trac.webkit.org/changeset/151665>