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

Aria role not set on the dropdown. #689

Open
ghost opened this issue Jan 19, 2023 · 0 comments
Open

Aria role not set on the dropdown. #689

ghost opened this issue Jan 19, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jan 19, 2023

Is your feature request related to a problem? Please describe.
Without an Aria role, some of the aria attributes set by the component such as "aria-expanded" conflict with WCAG guidelines and cause it to fail. (https://dequeuniversity.com/rules/axe/4.6/aria-allowed-attr). There is no default role set for the select component and there doesn't seem to be any way to pass one in.

Describe the solution you'd like
Either hardcode a default role of "listbox" or provide a prop where the role can be passed in like it is done with labelledby

Describe alternatives you've considered
Other options are to spread out any other props/attributes that are sent to the component across the main div. This way, user can set whatever attributes they want. Yet another option would be to change the implementation to use a forwarding ref so that the consumer can get hold of the ref and manipulate it themselves.

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

No branches or pull requests

0 participants