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: Items not read aloud #253

Open
UltimateGG opened this issue May 5, 2024 · 1 comment · May be fixed by #254
Open

Accessibility: Items not read aloud #253

UltimateGG opened this issue May 5, 2024 · 1 comment · May be fixed by #254

Comments

@UltimateGG
Copy link

UltimateGG commented May 5, 2024

At least with ChromeVox:
Using arrow keys does not announce the highlighted value.
https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/

I cannot figure out why, compared html to the WAI page's combobox, they look the same.

@UltimateGG
Copy link
Author

The issue is value not being in the dependency array for the useMemo of selectedItemId:
https://github.com/pacocoursey/cmdk/blob/13f11c4f918cb4f7eb6254b4087a9cc83928b503/cmdk/src/index.tsx#L790C1-L790C9

I'd make a pull request but there is still some problems:

  • To read it must have the element focused with the aria-activedescendant attribute
  • If there is no Command.Input there is no focused element with activedescendant
  • If an item is clicked the input is no longer focused
  • The query for a selected item uses encodeURIComponent - Even on the demo website this breaks as spaces get "%20"'d and it thinks nothing is selected

@UltimateGG UltimateGG linked a pull request May 5, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant