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

Accessibility issue in "Forms → Autocomplete" (focus management) #224

Open
roelvangils opened this issue Nov 22, 2020 · 0 comments
Open

Comments

@roelvangils
Copy link

roelvangils commented Nov 22, 2020

Describe the bug

When you build a JavaScript component, you need to manage focus for both keyboard users and screen reader (AT) users.

  • Visually, users get to see get a list of options, but the current selection is not communicated in code.
  • Visually, a suggestion is given by making certain letters bold in the text. This does nothing in code as an AT user is still focused on the input and not on the list.

Note: this issue is blocking.

How to fix

Add aria-expanded to the <input>, instead of a using <div> that doesn't get focused. What doesn't get focused is usually not announced by AT.

We prefer using the technique that inolves using element.focus and tabindex.

More information: Element.focus vs aria-activedescendant | Zell Liew

@roelvangils roelvangils changed the title Accessibility issue in "Forms → Autocomplete" (additional recommendations) Accessibility issue in "Forms → Autocomplete" (focus management) Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant