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

Discussion: removal of accessibilityComponentType and accessibilityTraits properties #24016

Closed
estevaolucas opened this issue Mar 18, 2019 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot. Type: Discussion Long running discussion.

Comments

@estevaolucas
Copy link

React Native version 0.57 introduced two accessibility properties, accessibilityRole and accessibilityStates, as "replacement" for accessibilityComponentType and accessibilityTraits.

And this is what we have in the docs:

Note: Accessibility Role and Accessibility States are meant to be a cross-platform solution to replace accessibilityTraits and accessibilityComponentType, which will soon be deprecated. When possible, use accessibilityRole and accessibilityStates instead of accessibilityTraits and accessibilityComponentType.
https://facebook.github.io/react-native/docs/accessibility

I wonder if it's already right moment to remove those old properties from the codebase, as part of 0.60, or if there's a plan to remove it in some specific version.

Would be good to remove those properties, making the accessibility props lean, and also because there's an approved plan to add more roles and states into the new props, which would make those props more useless.

According to this announcement post, Facebook is already using those new methods.

"These properties are already being used in Facebook's codebase".

In case it's time to remove it, I can help with it.

cc @cpojer

@estevaolucas estevaolucas added the Type: Discussion Long running discussion. label Mar 18, 2019
@estevaolucas
Copy link
Author

btw, I've working to add the switch role & on & off state. Hopefully I'll have a PR soon

@cpojer
Copy link
Contributor

cpojer commented Mar 19, 2019

Sounds good, please send a PR :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot. Type: Discussion Long running discussion.
Projects
None yet
3 participants