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

Let Chip get custom accessibility roles #4384

Open
billomore opened this issue Apr 25, 2024 · 0 comments
Open

Let Chip get custom accessibility roles #4384

billomore opened this issue Apr 25, 2024 · 0 comments

Comments

@billomore
Copy link

Is your feature request related to a problem? Please describe.
The Chip component is frequently used for display purposes, and in these cases is often never clickable. However, the Chip element still announces as a button because it has accessibilityRole="button" hardcoded.

When the Chip element is not being used as a button, a more sensible accessibilityRole should be able to be passed through. This PR keeps the default "button" accessibilityRole, but adds the ability to pass in a different accessibilityRole if "button" doesn't make sense.

Describe the solution you'd like
I'd like to be able to pass custom accessibility roles to Chips.

There's a PR #4327 by @meatnordrink that fixes the issue, it's really simple and straightforward.

Describe alternatives you've considered
Creating my own Chip component could be an alternative, but I really like the concept of having as much UI elements as possible under one lib.

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

No branches or pull requests

1 participant