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

[Bug]: Headless UI Vue > Listbox: Disabled Option in focus after click + arrow navigation #508

Closed
simonswiss opened this issue May 11, 2021 · 2 comments

Comments

@simonswiss
Copy link
Contributor

What package within Headless UI are you using?

@headlessui/vue

What version of that package are you using?

^1.2.0

What browser are you using?

Chrome, Safari

Reproduction repository

https://github.com/simonswiss/headlessui-vue-listbox-disabled-item-focus

Describe your issue

When clicking on a disabled ListboxOption item, the item enters in focus (with slightly different behaviours in different browsers, see repro README).

The assumption is that an element with a disabled="true" attribute should never be focusable/focused.

The repro README has instructions on how to reproduce the issue.

@RobinMalfait
Copy link
Member

Yep, good catch!

This should be fixed, and will be available in the next release.
You can already try it using npm install @headlessui/vue@dev or yarn add @headlessui/vue@dev.

@ITsvetkoFF
Copy link

just a note here: for accessibility reasons this might be considered feature, not a bug. example 1 example2 (see the second one)

the reason is simple - if you're navigating using keyboard - you'll never know there is an item.

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