Skip to content

Tab navigation not working on disabled elements with tabIndex=0 #399

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

Open
dmytrokirpa opened this issue Aug 14, 2024 · 3 comments · May be fixed by #451
Open

Tab navigation not working on disabled elements with tabIndex=0 #399

dmytrokirpa opened this issue Aug 14, 2024 · 3 comments · May be fixed by #451
Assignees

Comments

@dmytrokirpa
Copy link

dmytrokirpa commented Aug 14, 2024

Background:

There is an issue in the Fluent UI repository concerning tab navigation beyond disabled elements and a PR with attempt to fix it. And it appears to be related to Tabster's handling of tab navigation for disabled elements with tabindex="0".

Steps to reproduce:

  1. Visit https://codesandbox.io/p/sandbox/epic-easley-v2n9kf?file=%2Fsrc%2FApp.tsx%3A16%2C42
  2. Use the tab key to navigate between buttons

Expected result:

Tab navigation should bypass all disabled elements.

Actual result:

Tab navigation halts after encountering disabled elements with tabindex="0".

Screen.Recording.2024-08-14.at.12.40.44.mov

Note: While removing tabindex="0" from disabled elements is a workaround, the question remains whether Tabster should inherently support such cases.

@rgallagherab
Copy link

We've run into the same issue in our products.

@rgallagherab
Copy link

I did open a pull request last week with a fix for this: #451

FOCUSABLE_SELECTOR attempts to make disabled inputs and form controls unfocusable with :not([disabled]), but then matches *[tabindex] as focusable (which should never be allowed on disabled button, input, select, or textarea).

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