Skip to content

Discussion: removal of accessibilityComponentType and accessibilityTraits properties #24016

Closed
@estevaolucas

Description

@estevaolucas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions