ThakurBallary / react-native-radio-buttons-group

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

chore: enhance a11y defaults #64

Closed a7medev closed 9 months ago

a7medev commented 9 months ago

I've checked the latest changes made in 4343411, and TBH, I think these changes hurt accessibility instead of enhancing it.

  1. I've removed the default "radio button" accessibility label added to radio buttons since it doesn't tell anything about the button itself and just tells the role of the view instead. I've replaced it to default to the value passed to the label property instead which is much more helpful since the label is actually required and is what is actually visible to users. I've also made it such that the user can provide a custom accessibilityLabel if he doesn't want to default to the label property.
  2. I've removed the default "radio group" accessibility label added to the radio group for the same reason as the radio button, it doesn't tell anything about the element. But the attribute is there if the developer cares about accessibility he can add a better accessibilityLabel.

I'm open to discussion about these changes or anything related so that we can enhance the accessibility of this library for users.