-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Tabs block: Keyboard Accessibility #75402
Copy link
Copy link
Open
Labels
[Block] TabsAffects the Tabs BlockAffects the Tabs Block[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Metadata
Metadata
Assignees
Labels
[Block] TabsAffects the Tabs BlockAffects the Tabs Block[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
🏗️ In Progress
Description
The front-end keyboard accessibility of the tabs block is very buggy. It works when navigated using
tabandenterto activate tabs, but the arrowkey support is quite buggy. Unfortunately, tablists preferably should not be navigable usingtabandenter; when the tablist is focused, focus should go to the first tab, then navigating between tabs should be done using arrow keys.tabindex="-1", preventing focus.aelements, which are only triggered by enter. But tabs expectbuttonbehaviors, so they need to be triggered by either space or enter. Enter should trigger onkeydown, space should trigger onkeyup.Step-by-step reproduction instructions
tab. Note that the focus moves to the second tab, bypassing the first.Screenshots, screen recording, code snippet
Environment info
-WP 7.0-alpha-61605
-Gutenberg 22.5.1
-MacOS/Firefox 146.0.1
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.