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

Autocomplete: aria-labelledby is still present when aria-label is passed. #1182

Closed
catamphetamine opened this issue Oct 2, 2020 · 1 comment
Labels

Comments

@catamphetamine
Copy link

Autocomplete: aria-labelledby is still present when aria-label is passed.
Both on getMenuProps() and getInputProps().
Workaround:

        <input
          ref={ref}
          {...getInputProps({
            'aria-labelledby': undefined,
            'aria-label': 'abc'
          })} />
@silviuaavram
Copy link
Collaborator

That's expected. I understand that it may be cool to have aria-labelledby removed automatically when aria-label is used. However it's not something I would like to encourage. Form elements should always have a physical label for many reasons. If your spec simply just cannot contain a physical label, then the workaround above should be good enough.

Thank you!

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

No branches or pull requests

2 participants