react-native-segmented-control / segmented-control

React Native SegmentedControl library
MIT License
540 stars 84 forks source link

Improve Accessibility Reading on Android #109

Open und3f1n3d opened 4 years ago

und3f1n3d commented 4 years ago

Bug report

Summary

  1. When button is selected, the button is not read as 'Selected' and as a 'Button'.
  2. It doesn't read the total of items, nor current index, something like '1 out of 2', or '2 out of 2'. Example, Google Play Store => Top Charts => the list of "Top Free", "Top Grossing", "Trending"... that kind of idea.

Environment info

Library version: 2.1.0

Steps to reproduce

  1. Turn on Talkback
  2. selectedIndex = 0
  3. Swipe to the first element, reading: 'Photo, Double Tap to activate.'
  4. Swipe to the second element, reading: 'Settings, Double Tap to activate.'

Describe what you expected to happen:

  1. Turn on Talkback
  2. selectedIndex = 0
  3. Swipe to the first element, expected reading: 'Selected. Photo Button. 1 out of 2. Double Tap to activate.'
  4. Swipe to the second element, expected reading: 'Settings Button. 2 out of 2. Double Tap to activate.'

Reproducible sample code

    <SegmentedControl
      selectedIndex={0}
      values={['Photos', 'Settings']}
    />
thibmaek commented 3 years ago

Partial fix: https://github.com/react-native-segmented-control/segmented-control/pull/219