feat: Adding basic accessibility out of the box#31
feat: Adding basic accessibility out of the box#31AdityaPahilwani wants to merge 1 commit intoKarthik-B-06:mainfrom
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.