Border radius control: incorrect usage of Tooltip causes unexpected tab stop #68591
Open
2 of 6 tasks
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Components
/packages/components
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
Discovered while testing #68498
This is one more occurrence of incorrect usage of the Tooltip component. Cc @WordPress/gutenberg-components
The Ariakit-based Tooltip adds a
tabindex=0
attribute to the DOM element it wraps. When the wrapped DOM element happens to be an element that is supposed to be focusable that't not a big deal. However, when the wrapped element is just a DIV element, it becomes a focusable non-interactive, non-labeled element. This isn't OK and among other things it causes an unexpected tab stop when using the keuboard.gutenberg/packages/block-editor/src/components/border-radius-control/input-controls.js
Lines 71 to 86 in ddfbdcc
In this case, the element with CSS class
components-border-radius-control__tooltip-wrapper
gets atabindex=0
. As such, tabbing through the UI requires an additional, unexpected, Tab press on an element that isn't interactive just to make hte Tooltip appear.Animated GIF:
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
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.
The text was updated successfully, but these errors were encountered: