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

Aria-Expanded true on Input? #316

Open
zachlankton opened this issue Oct 18, 2024 · 0 comments
Open

Aria-Expanded true on Input? #316

zachlankton opened this issue Oct 18, 2024 · 0 comments

Comments

@zachlankton
Copy link

Hello! Love your project!

what is the purpose of aria-expanded on the input?

aria-expanded={true}

I have an edge case where I'm looking for aria-expanded attributes to determine if there are popovers open while inside of a dialog.

In these cases I handle the escape key to close the popover and not the dialog.

This works fantastic when I render CMDK inside a combobox like shadcn combobox.

But when I use CMDK (Command in Shadcn) inline directly inside a modal my escape key functionality is not workin as expected because aria-expanded is set to true on the input.

This seems a little strange to me as the control is rendered in line and is not actually "expanded".

I realize this must be an incredibly arcane and strange edge case, but I'm curious to know why the decision was made to make aria-expanded true regardless of any expanded context or control?

And also... would you be open to make this property available to be over-ridden via props? 😊

Willing to contribute here if needed!

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