oceanbit / react-native-button-toggle-group

An animated button toggle group for React Native
47 stars 14 forks source link

TalkBack doesn't read selected item on hover #5

Open crutchcorn opened 3 years ago

crutchcorn commented 3 years ago

As-of v1.1.1 (with the new A11Y fixes), when using the swipe left/right methods of selecting items, we get the proper readout of the selected item:

Expected behavior reading out as-intended

mHowever, when trying to hover (tap) to select an item (not double-tap to select, just single tap to "read"), it simply "boops" to let you know that there's nothing there:

Incorrect behavior


From a technical perspective, what's happening is that we are using a MaskedView to show the selected buttons over the unselected buttons. This allows us to do the trademark animation that we're using for the package.

However, despite using accessibilityElementsHidden={true}, Android refuses to read the button that's underneath the MaskedView, even when pointerEvents is set to 'none'

I tried for an hour to debug this but can't seem to figure out how to fix this issue.