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

fix: Prevent infinite tabbing loop by checking for other active elements when tabbing out #2846

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cspalevic
Copy link

Description

There is an issue with the radio group component that causes an infinite tabbing loop when it includes another focusable element.

In the following example, there is a link within the radio group. When the second radio group item is selected and a user tries to tab out (with shift+tab), the focus then goes to the Link element. After hitting shift+tab again, the focus goes back to the selected radio group item. And the user is stuck in a loop.

before.mov

This PR begins to only signify that the user is tabbing out as long as the active element is not contained within the radio group. This prevents auto-focusing to the selected radio group item and allows the user to tab out of the radio group.

after.mov

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 this pull request may close these issues.

None yet

1 participant