React-native-gesture-handler: Buttons and accessibility on Android

Created on 16 Feb 2019  路  2Comments  路  Source: software-mansion/react-native-gesture-handler

I don't seem to be able to interact with gesture handler buttons using the accessibility tools on Android.

When you enable TalkBack on Android, there are 2 issues with the gesture handler's button:

  • The accessibilityRole doesn't seem to be applied. talkback doesn't announce it as a button
  • It's not possible to interact with the button via double tap

In this snack, I added a button with TouchableNativeFeedback where these two work as I expect, and button from GestureHandler where they don't work:

https://snack.expo.io/@satya164/gesture-handler-button-accessibility

Accessibility Feature request

Most helpful comment

Thanks @adamczyk777

All 2 comments

Fix:

<RectButton
  onPress={() => alert('Clicked RectButton')}>
  <View accessible accessibilityRole="button">
    <Text>RectButton</Text>
  </View>
</RectButton>

Thanks @osdnk

Thanks @adamczyk777

Was this page helpful?
0 / 5 - 0 ratings