Re: Moving VoiceOver cursor to a specific element inside a UIWebView
Re: Moving VoiceOver cursor to a specific element inside a UIWebView
- Subject: Re: Moving VoiceOver cursor to a specific element inside a UIWebView
- From: Bobby Thomale <email@hidden>
- Date: Fri, 05 Feb 2016 07:43:09 -0600
I am trying to do the same thing that Hynek is trying to do, except I am on MacOS X with a WebView. (We’re going to need to do the same thing on iOS too, but right now I’m focusing on the Mac.)
I have a book viewer application, that has a navigation panel in one view, and a webview containing the book the user is reading in another panel.
When the user is in the navigation panel and navigates to an element, I can focus the element in the HTML (using focus()). I can see that it is working, because there is a focus ring around the element after I call focus(). However, when the user navigates the VoiceOver focus from the navigation view back to the webview, VoiceOver always resets the focus back to the beginning of the HTML content, no matter what I do. How do I get VoiceOver to respect the focus that I’ve set with _javascript_?
In general, this behavior of resetting the focus back to the beginning of the web view is really annoying. If the user is interacting with the webview, then leaves and comes back, they always end up back at the beginning of the content. If you’re displaying an entire chapter of a book, this is very bad. A sighted user’s focus is always on whatever is at the top of where they are currently scrolled - it would be so much nicer if it would focus an element at the top of the scroll area instead.