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 · 4 comments · May be fixed by #254
Open

Accessibility: Items not read aloud #253

UltimateGG opened this issue May 5, 2024 · 4 comments · 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
@jacobsickels
Copy link

Please merge this change!

@Alechuu
Copy link

Alechuu commented Sep 25, 2024

Bumping this up, just encountered this issue as well and thought we had implemented it in a wrong way.

@SaveliiLukash
Copy link

SaveliiLukash commented Oct 14, 2024

We just came across this, too, when migrating from react-select, which is not actively maintained, to shadcn/ui's implementation of Combobox that uses cmdk. It appears that the last release of cmdk was over half a year ago, with many active PRs waiting to be merged.

@pacocoursey The component is great, we are grateful for your work and would like to use it in our projects. Are there any plans for this module to continue to be maintained?

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.

4 participants