| Summary: | AX: Properly expose lists that have display:contents list items | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tyler Wilcock <tyler_w> | ||||||
| Component: | Accessibility | Assignee: | Tyler Wilcock <tyler_w> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | Other | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
Created attachment 465862 [details]
Patch
(In reply to Tyler Wilcock from comment #2) > Created attachment 465862 [details] > Patch --- a/Source/WebCore/accessibility/AXObjectCache.cpp +++ b/Source/WebCore/accessibility/AXObjectCache.cpp - RefPtr<AccessibilityObject> newObj = createFromNode(node); + RefPtr<AccessibilityObject> newObj = createFromNode(*node); RefPtr<AccessibilityObject> newObj --> RefPtr newObject + if (auto* node = this->node()) + return node->hasTagName(ulTag); + return false; I prefer the two liner idiom: auto* node = this->node(); return node ? node->hasTagName(ulTag) : false; + if (auto* node = this->node()) + return node->hasTagName(olTag); + return false; Same as above. + if (auto* node = this->node()) + return node->hasTagName(dlTag); + return false; Same as above. else if (child->roleValue() == AccessibilityRole::ListItem) { - RenderObject* listItem = child->renderer(); - if (!listItem) - continue; - // Rendered list items always count. Does this comment make sense any more? Created attachment 465868 [details]
Patch
> else if (child->roleValue() == AccessibilityRole::ListItem) {
> - RenderObject* listItem = child->renderer();
> - if (!listItem)
> - continue;
> -
> // Rendered list items always count.
> Does this comment make sense any more?
Just re-read the function and I think it still does since the purpose of the if-statement is to find rendered list items. Fixed all other comments, thanks!
Committed 262889@main (f49113b35bbd): <https://commits.webkit.org/262889@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 465868 [details]. |
<div role="list" id="list"> <li id="li1" style="display:contents">One</li> <li id="li2"style="display:contents">Two</li> </div> We don't expose this as a list which is wrong.