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

Inaccessible with aria-activedescendent being undefined #139

Closed
adamaho opened this issue May 18, 2023 · 5 comments
Closed

Inaccessible with aria-activedescendent being undefined #139

adamaho opened this issue May 18, 2023 · 5 comments

Comments

@adamaho
Copy link

adamaho commented May 18, 2023

Problem

When using cmdk with app router in nextjs 13 cmdk doesn't respect screen readers.

Note: I have not tested to see if this problem exists with client side apps at all. So it could just be a bug with version 0.2.0. But that is assuming the cmdk docs site hasn't been deployed since 0.2.0 was released since it is working on that site right now.

Current Diagnosis

It seems that each of the Command.Item's are missing their id. Which means aria-activedescendent is undefined and therefore not reading out what the currently selected / highlighted item is in voice over. Which I assume means that this returning undefined

Reproduction

Repo: https://github.com/adamaho/cmdk-next13-app-router

You can also inspect the DOM here: https://ui.shadcn.com/docs/components/command and notice the same symptoms mentioned above. Which is a site that uses cmdk with app router.

Version

0.2.0

@joaom00
Copy link
Contributor

joaom00 commented May 18, 2023

Hey @adamaho,

That was fixed in #108 and will be in the next release!

@adamaho
Copy link
Author

adamaho commented May 18, 2023

Ahhh wonderful! My bad for not checking past PR's. I was just looking at the source code and noticed that the code was there and was expecting it to work haha. That is good to know though! Feel free to close this issue :)

@dylanjt
Copy link

dylanjt commented Nov 6, 2023

Bump.. I would love to use this library but the App Router incompatibility is blocking atm.

@adamaho
Copy link
Author

adamaho commented Nov 6, 2023

FWIW this component works just fine on App Router as it is today. The title is a little mis-leading. I am going to update that now.

We really just need a new release to come out. There hasn't been one published since March. See: https://github.com/pacocoursey/cmdk/releases/tag/v0.2.0

@adamaho adamaho changed the title Inaccessible on nextjs 13 with app router Inaccessible with aria-activedescendent being undefined Nov 6, 2023
@adamaho
Copy link
Author

adamaho commented Nov 6, 2023

Closing since this issue was fixed in #108

@adamaho adamaho closed this as completed Nov 6, 2023
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

3 participants