HierarchicalTermSelector: Unnecessary tab focus #65894
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Type] Bug
An existing feature does not function as intended
Description
For example, this component is used in the Categories panel to render a list of categories with checkboxes.
These checkboxes are wrapped by an element with the
role="group"
attribute, but because this element itself has thetabIndex=0
attribute, unnecessary tab focus occurs:gutenberg/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js
Lines 418 to 423 in 90d7c3b
Even if we focus on this element, we cannot perform any operations with the keyboard. Also, even without this tabindex, when the first checkbox in the group is focused, the
aria-label
of the element with therole="group"
attribute is read out, so thetabindex
attribute should not be necessary.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
3aaafd960487853a303704679a622965.mp4
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.
The text was updated successfully, but these errors were encountered: