Summary: | AX: WebKit does not break AX modality when focus is explicitly moved outside the modal | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Tyler Wilcock
2022-10-15 13:29:45 PDT
Created attachment 463012 [details]
Patch
Created attachment 463013 [details]
Patch
Comment on attachment 463013 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=463013&action=review > Source/WebCore/accessibility/AXObjectCache.h:515 > + enum class WillRecomputeFocus : bool { No, Yes }; "RecomputeFocus" seems like might be enough > Source/WebCore/accessibility/AXObjectCache.h:517 > + Element* updateCurrentModalNodeInternal(WillRecomputeFocus = WillRecomputeFocus::No); both of these are private methods. can they be combined? or renamed to be more specific? Created attachment 463039 [details]
Patch
(In reply to chris fleizach from comment #4) > Comment on attachment 463013 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=463013&action=review > > > Source/WebCore/accessibility/AXObjectCache.h:515 > > + enum class WillRecomputeFocus : bool { No, Yes }; > > "RecomputeFocus" seems like might be enough I chose "WillRecomputeFocus" here because updateCurrentModalNodeInternal needs to know if the calling code knows we will recompute the focus through some other means (e.g. via our modal auto-focusing mechanism). It needs to know this because if the calling context will not recompute focus, and the focused element is outside our modals, we must invalidate modality per-spec. I feel like "RecomputeFocus" doesn't capture this intent the same way "WillRecomputeFocus" does, but if you feel strongly about RecomputeFocus or some other alternative I'd be willing to make the change. > > Source/WebCore/accessibility/AXObjectCache.h:517 > > + Element* updateCurrentModalNodeInternal(WillRecomputeFocus = WillRecomputeFocus::No); > > both of these are private methods. can they be combined? or renamed to be > more specific? Fixed by inlining updateCurrentModalNodeInternal into a lambda within updateCurrentModalNode. Committed 255665@main (b6eab27a3f8d): <https://commits.webkit.org/255665@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463039 [details]. |