I had the same issue when VoiceOver turned on when loading webview. It seemed to be linking to content in a web browser before it was fully downloaded. To stop this crash, I simply hid the accessibility elements until the webview was loaded. Be sure to set the ViewController as a UIWebViewDelegate . Then:
ObjC example:
-(void)viewDidLoad { [super viewDidLoad]; [self.view setAccessibilityElementsHidden:YES]; } -(void)webViewDidFinishLoad:(UIWebView*)webView { [self.view setAccessibilityElementsHidden:NO]; }
Swift example: (You must use WKWebView, so I will give you an example of this below). Be sure to set the ViewController as WKNavigationDelegate
override func viewDidLoad() { super.viewDidLoad() view.accessibilityElementsHidden = true } func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { view.accessibilityElementsHidden = false }
Hope this helps.
source share