ThakurBallary / react-native-radio-buttons-group

Simple, best and easy to use radio buttons for react native apps.
MIT License
263 stars 71 forks source link

feat: improve accessibility #60

Closed a7medev closed 1 year ago

a7medev commented 1 year ago

Improved the accessibility of the radio group by adding the correct accessibility roles for both the radio group (radiogroup role), and the radio buttons (radio role) along with the corresponding accessibility states (checked and disabled) and labels.

I tested it with TalkBack on Android and it's working pretty well. I wanted to record a video of me using it with TalkBack but I had problems recording video with audio on my Android device.

Note, for the RadioGroup to be announced as a "radio group" by TalkBack you need to provide it with an accessibilityLabel. Once an accessibilityLabel is added, it should be announced as "LABEL, radio group"

Checked radio buttons are now announced "Checked, LABEL, radio button, double tap to toggle" and unchecked radio buttons are announced "Not checked, LABEL, radio button, double tap to toggle"