Skip to content

[a11y] Lightbox: Focus leaks outside the overlay during keyboard navigation (Tab key) #75801

@Gierand

Description

@Gierand

Description

When navigating a lightbox gallery using keyboard (Tab / Shift+Tab), focus escapes outside the lightbox overlay and becomes invisible — the focus indicator disappears entirely, leaving the user with no visual feedback on where they are on the page.

Expected behavior:

Focus cycles only within the lightbox (close button, navigation arrows). When the last focusable element is reached, focus should wrap back to the first one.

Step-by-step reproduction instructions

  1. Add a Gallery block to a page/post.
  2. Enable the lightbox option for the gallery.
  3. Open the published page and open the lightbox by clicking on an image.
  4. Navigate using the Tab key repeatedly.

Screenshots, screen recording, code snippet

No response

Environment info

  • Gutenberg version: 22.6 RC1, 22.8.-nightly
  • Active theme: TT5

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] GalleryAffects the Gallery Block - used to display groups of images[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions