sAleksovski / react-native-android-widget

Build Android Widgets with React Native

Home Page:https://sAleksovski.github.io/react-native-android-widget/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accessibility / a11y TalkBack descriptions

benvium opened this issue · comments

First up, thanks for this really interesting library! It's a challenging problem and your solution is neat.

Do you have any thoughts on how widgets using this could be made accessible with TalkBack?
The ideal case would be that individual components could have contentDescription etc props.
Failing that a reasonable fallback would be the ability to set a contentDescription on the widget root itself - that way a TalkBack user who taps anywhere on the widget could hear something like 'Music Widget. Currently playing all along the watchtower' etc.

For reference, at present when I tap my 'hello world' widget in TalkBack it reads out:

Unlabelled, double-tap to activate labels available use tap with three fingers to view

Thanks!

The problem is that this library renders the widget to an image, so there are no Android views to add contentDescription to.

I assume we can implement it in a similar way like the buttons, add an empty FrameLayout with contentDescription on the place of the components that have accessibility settings.

I'll take a look when I have some free time.

Thanks for the response. Aha - yeah that sounds like a great plan, FrameLayouts would very likely do the trick.