Bug 266507

Summary: AX: cannot use accessibility to focus an element in a cross-origin iframe
Product: WebKit Reporter: Dominic Mazzoni <dm_mazzoni>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jenner, samuel_white, simon.fraser, tyler_w, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Dominic Mazzoni
Reported 2023-12-15 14:26:11 PST
If you use VoiceOver to navigate to a text field inside a cross-origin iframe, the field doesn't automatically get keyboard focus. The issue is that Element::focus checks whether the frame has had previous user interaction. To fix it, we can just mark the accessibility focus request as a user gesture.
Attachments
Patch (5.01 KB, patch)
2023-12-15 14:31 PST, Dominic Mazzoni
no flags
Patch (4.74 KB, patch)
2023-12-17 13:07 PST, Dominic Mazzoni
no flags
Patch (5.53 KB, patch)
2023-12-18 13:06 PST, Dominic Mazzoni
no flags
Patch (5.58 KB, patch)
2023-12-19 14:08 PST, Dominic Mazzoni
no flags
Radar WebKit Bug Importer
Comment 1 2023-12-15 14:26:21 PST
Dominic Mazzoni
Comment 2 2023-12-15 14:31:33 PST
Dominic Mazzoni
Comment 3 2023-12-17 13:07:52 PST
Dominic Mazzoni
Comment 4 2023-12-18 13:06:55 PST
Dominic Mazzoni
Comment 5 2023-12-19 14:08:44 PST
Simon Fraser (smfr)
Comment 6 2023-12-20 11:33:14 PST
> mark the accessibility focus request as a user gesture Does this mean that any script that runs as a result of that focus also gets the user gesture permissions?
Dominic Mazzoni
Comment 7 2023-12-20 11:43:09 PST
(In reply to Simon Fraser (smfr) from comment #6) > > mark the accessibility focus request as a user gesture > Does this mean that any script that runs as a result of that focus also gets > the user gesture permissions? Good question. Yes, but that'd be no different than if the user pressed Tab to focus the same control and that triggered a script. Actions triggered by assistive technology should have the same effect as actions triggered by a keyboard or pointing device.
EWS
Comment 8 2023-12-20 19:58:34 PST
EWS
Comment 9 2023-12-21 13:13:27 PST
Committed 272428@main (e4365c7e414c): <https://commits.webkit.org/272428@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 469134 [details].
Note You need to log in before you can comment on or make changes to this bug.