Skip to content
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

fix: allow setting accessibility prop for Button component #2448

Merged
merged 1 commit into from
Jan 5, 2021

Conversation

RafikiTiki
Copy link
Member

Summary

In my current project I have a very specific business requirement: in a web version of application few buttons need to be taken out of keyboard navigation flow (using tab key) while at the same time still being clickable by mouse. Using disabled prop will obviously break second part of the requirement so I've investigated a little how other accessibility-related props do work in react-native-web and it turned out that accessible prop is exactly what I'm looking for. Unfortunately in Paper's <Button /> component accessible prop is passed to the wrapping <Surface /> component, not the <TouchableRipple /> which is then rendering <TouchableWithoutFeedback />. That is making accessible prop have no effect.

This PR is fixing that issue but for some reason some of the library users may depend on passing accessible prop to the wrapping <Surface /> so it is possibly a Breaking Change.

@callstack-bot
Copy link

Hey @RafikiTiki, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@Trancever
Copy link
Contributor

@RafikiTiki I'll review and eventually merge early next week, but at first glance, it doesn't look like a breaking change. It's been broken and we are fixing a bug here I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants