DOM: tabbable throws an error while editor in Select Mode #36844
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] DOM
/packages/dom
[Type] Bug
An existing feature does not function as intended
Description
When tabbing through elements in the Post Editor, tabbable.js throws an error when it cannot find a target element in its "focusable" array, which is an array of elements that are eligible for focus.
The issue came to light in #35655. Props to @andrewserong for first documenting it.
As far as I can see, the error is thrown in tabbable.js because the focussed element doesn't appear in the array of focusable elements.
The
index
therefore is-1
.So when I logged things out like
The element is, more often than not,
.block-selection-button_select-button
, and this only happens when I enable select mode (hittingEsc
in the editor).Step-by-step reproduction instructions
Esc
key. You'll know you're in Select mode when the block controls toolbar turns to black.Screenshots, screen recording, code snippet
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: