Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TalkBack accessibility in WebView

I have this app with WebView for displaying HTML content.

After some fairly major changes I've made, there are "issues" with TalkBack accessibility, specifically text to speech and explore by touch, on 4.4 devices only (not on 5.0).

Touching a piece (paragraph) of text sometimes works, but sometimes produces a click sound and there is no output and the text doesn't get highlighted with a selection rectangle as it should be.

On 5.0, everything is just fine: touching a piece text draws a selection around it, and the text is spoken.

I know that the regression on 4.4 has to do with some of my changes, but it was a significant rewrite and backtracking changes one by one doesn't seem productive and may be downright impossible.

JavaScript is enabled. The WebView is set as focusable and focusableInTouchMode (the latter is when I see that accessibility is enabled) edit: tried without focusableInTouchMode, no difference.

The WebView's dimensions are match_parent / match_parent, so it's about as large as the screen is (and handles its own scrolling).

From my point of view, TalkBack inside WebView is "magic that just works" when enabled by the user: as far as I know, there are no APIs to call, no integration points, nothing, it's supposed to "just work".

How does one go about diagnosing an issue like this?

Is it possible to ask for help from someone at Google? If so, what are the channels? I've posted on eyes-free and submitted feedback via TalkBack support, but have not received any response.

Is there any sort of "debug / developer" mode in TalkBack? Verbose logging? Anything?

like image 641
Kostya Vasilyev Avatar asked Jul 28 '15 19:07

Kostya Vasilyev


1 Answers

You might take a look at this before trying to go through all of that!

mWebView.setAccessibilityDelegate(new View.AccessibilityDelegate());
like image 80
ChrisCM Avatar answered Nov 12 '22 20:11

ChrisCM