Bug 249976 - WKWebView steals first responder when focused via VoiceOver
Summary: WKWebView steals first responder when focused via VoiceOver
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-31 17:13 PST by Saagar Jha
Modified: 2023-02-17 20:51 PST (History)
11 users (show)

See Also:


Attachments
Patch (7.37 KB, patch)
2023-02-16 12:00 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (8.56 KB, patch)
2023-02-16 22:01 PST, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saagar Jha 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 :)
Comment 1 Radar WebKit Bug Importer 2022-12-31 17:13:13 PST
<rdar://problem/103794378>
Comment 2 Tyler Wilcock 2023-02-16 12:00:27 PST
Created attachment 465029 [details]
Patch
Comment 3 Tyler Wilcock 2023-02-16 22:01:54 PST
Created attachment 465044 [details]
Patch
Comment 4 Tyler Wilcock 2023-02-17 20:07:55 PST
Thanks for the bug report!
Comment 5 EWS 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].