-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
NavigableContailer
: do not trap focus in TabbableContainer
#49846
Conversation
Size Change: -6 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
Going to rebase to include changes from #49377 |
97e70ec
to
9b05ffd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for leaving all of the clear comments along the way 🚀 🚢
4dff16e
to
a91f308
Compare
Flaky tests detected in a91f308. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4916239313
|
What?
While reviewing #49377, I noticed that
TabbableContiner
traps focus within its boundaries even when thecycle
prop isfalse
.This PR tweaks the logic to fix the behavior and allow for the focus to leave
TabbaleContainer
when thecycle
prop is nottrue
How?
Moving the
preventDefault
call only when the component is handling thefocus
directlyTesting Instructions
Note that the
TabbableContainer
component has currently no usages in the repository outside of its Storybook examples.Testing Instructions for Keyboard
On trunk:
TabbableContainer
Storybook examplecycle
prop is set tofalse
On this PR:
TabbableContainer
when thecycle
prop is set tofalse
\Screenshots or screencast
trunk
:tabbable-before.mp4
This PR:
Kapture.2023-04-27.at.15.42.24.mp4