-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Adding basic accessibility out of the box #31
base: main
Are you sure you want to change the base?
Conversation
LGTM @AdityaPahilwani, and on a different note do you think we need to export the accessibility props? |
Yes that could be a nice addition. I was thinking of adding 2 props for accessible do you think equivalent of accessibilityrole, accessibilityState would make sense? |
Too many props as an array would make it odd as for the component. Need to think of a better way to get this done, I guess. I feel there are already too many props. If there isn't a way. We will have to create separate props for the same. Do you think changing the segments array into an array of objects would simplify this? |
initially, I thought about the same but changing the segments array into an array of objects would be a breaking change and for someone who isn't using accessibility keys, it would be a little more effort to put the component working. I think we can go with a mixed approach like either user pass array of labels or array of object, this way we can be backward compatible and give user control on what they want. |
Sounds good to me! |
I think we should have support for all these in objects, also I would love to pick this task. |
Great @AdityaPahilwani! Will wait for your PR :) Thank you. |
Currently, react-native-segmented-control is not accessible and neither export some props to add labels or hints on text and badges, this small PR adds very very basic accessibility out of the box.