Bug 249976

Summary: WKWebView steals first responder when focused via VoiceOver
Product: WebKit Reporter: Saagar Jha <saagar>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, tyler_w, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: iPhone / iPad   
OS: iOS 16   
See Also: https://bugs.webkit.org/show_bug.cgi?id=234885
Attachments:
Description Flags
Patch
none
Patch none

Saagar Jha
Reported 2022-12-31 17:13:02 PST
https://bugs.webkit.org/show_bug.cgi?id=234885 adds behavior to WebKit to forcefully, and asynchronously, steal first responder when the web view is focused with VoiceOver. This breaks input in our app, iSH (https://ish.app), for users who rely on accessibility technologies. Our app implements a terminal view that is rendered in a web view, but with us handling text input. In other words, we (our native terminal code) intentionally request first responder, while handing the web view focus. On recent versions of iOS the web view immediately tries to steal first responder status if it receives focus via VoiceOver, which means the keyboard disappears and users can no longer enter text. We cannot have the web view be first responder because it doesn't provide all the APIs that UIKit does to control cursor movement and text editing. A way to disable this new behavior would be nice to have, or better yet, suggestions on how we can achieve the functionality we need with this in place :)
Attachments
Patch (7.37 KB, patch)
2023-02-16 12:00 PST, Tyler Wilcock
no flags
Patch (8.56 KB, patch)
2023-02-16 22:01 PST, Tyler Wilcock
no flags
Radar WebKit Bug Importer
Comment 1 2022-12-31 17:13:13 PST
Tyler Wilcock
Comment 2 2023-02-16 12:00:27 PST
Tyler Wilcock
Comment 3 2023-02-16 22:01:54 PST
Tyler Wilcock
Comment 4 2023-02-17 20:07:55 PST
Thanks for the bug report!
EWS
Comment 5 2023-02-17 20:51:44 PST
Committed 260491@main (6c019d315e83): <https://commits.webkit.org/260491@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 465044 [details].
Note You need to log in before you can comment on or make changes to this bug.