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

Tabindex not working #5931

Closed
imtaxu opened this issue Jul 2, 2024 · 2 comments
Closed

Tabindex not working #5931

imtaxu opened this issue Jul 2, 2024 · 2 comments
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet

Comments

@imtaxu
Copy link

imtaxu commented Jul 2, 2024

Hi there,

When using react-select components with react-hook-form inside a Radix UI Sheet or Modal, the tabindex does not work.

Would you please see CodeSandbox Demo

The expected behavior is that after selecting a color, pressing the tab key should move the focus to the size input, but instead, it selects the sheet component. The tab key does not move the focus to the size input or button at all.

@imtaxu imtaxu added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label Jul 2, 2024
@ches4117
Copy link

ches4117 commented Jul 10, 2024

According to https://html.spec.whatwg.org/multipage/interactive-elements.html#dialog-focusing-steps, we should not set tabindex in dialog element

I found that Radix UI Sheet using tabindex={-1}, if we delete this, we can correctly use tab key.
Screenshot 2024-07-10 at 12 54 30 PM

@imtaxu
Copy link
Author

imtaxu commented Jul 11, 2024

Using it this way works, thanks.

<SheetContent tabIndex={false}> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet
Projects
None yet
Development

No branches or pull requests

2 participants