Block toolbar mover buttons trigger a focus loss #58511
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Block editor
/packages/block-editor
[Status] In Progress
Tracking issues with work in progress
[Type] Regression
Related to a regression in the latest release
Description
This appears to be a regression, although I'm not sure when it was introduced.
When using the keyboard to activate the 'Move up' and 'Move down' buttons in the block toolbar, focus is expected to stay on the button that was activated. Instead, there's now a focus loss and focus is moved to the first button within the toolbar.
I haven't dive into the code but I suspect a full-rerendering occurs and the toolbar sets focus on its first focusable control each time.
This unexpected behavior doesn't happen on previous WordPress version, as such it appears to be a regression that should be fixed in the next release. Cc @annezazu
Animated GIF to illustrate:
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.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: