| Summary: | AX: isSelected AX APIs don't work for some types of display:contents elements | ||||||
|---|---|---|---|---|---|---|---|
| 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: |
|
||||||
|
Description
Tyler Wilcock
2023-04-15 01:12:01 PDT
Created attachment 465937 [details]
Patch
Comment on attachment 465937 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=465937&action=review > Source/WebCore/accessibility/AccessibilityObject.cpp:2767 > + if (!renderer() && !node()) Should we proceed even if we don't have a renderer? for display contents. won't that not have a renderer (In reply to chris fleizach from comment #3) > Comment on attachment 465937 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=465937&action=review > > > Source/WebCore/accessibility/AccessibilityObject.cpp:2767 > > + if (!renderer() && !node()) > > Should we proceed even if we don't have a renderer? for display contents. > won't that not have a renderer True that display:contents won't have a renderer(), but it will have a node(), so we should be OK here. Comment on attachment 465937 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=465937&action=review >>> Source/WebCore/accessibility/AccessibilityObject.cpp:2767 >>> + if (!renderer() && !node()) >> >> Should we proceed even if we don't have a renderer? for display contents. won't that not have a renderer > > True that display:contents won't have a renderer(), but it will have a node(), so we should be OK here. do we need to check renderer() then? (In reply to chris fleizach from comment #5) > Comment on attachment 465937 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=465937&action=review > > >>> Source/WebCore/accessibility/AccessibilityObject.cpp:2767 > >>> + if (!renderer() && !node()) > >> > >> Should we proceed even if we don't have a renderer? for display contents. won't that not have a renderer > > > > True that display:contents won't have a renderer(), but it will have a node(), so we should be OK here. > > do we need to check renderer() then? Maybe not – I mostly tried to preserve the existing logic that would say "is selected" is false if there is no renderer. But I adapted it to display:contents to instead now be "is selected" is false if there is both no renderer and no node. Having one or the other satisfies the check and allows the function to proceed. Committed 263014@main (0b61863f7ec7): <https://commits.webkit.org/263014@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 465937 [details]. |