New lightbox UI triggers a focus loss #58509
Labels
[Block] Image
Affects the Image Block
[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] Bug
An existing feature does not function as intended
Description
The 'Expand on click' lightbox UI has been moved into the URL input UI in #57608
It appears the new UI hasn't been tested enough with keyboard as there'a a very clear focus loss, possibly more than one, when using the keyboard.
It appears to be one more case where a focusable element that has keyboard focus gets removed from the DOM without any focus management. Since the element that was focused doesn't exist any longer, focus is lost and the tab sequence starts from scratch from the document root.
Animated GIF to illustrate the focus loss:
Step-by-step reproduction instructions
Please text extensively with the keyboard to check for more potential focus losses.
Since this is a new bug in a new UI meant to be released in WP 6.5. it would be nice to fix it for the release. Cc @annezazu
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: