Skip to content

The main inserter has a visually hidden 'Close' button that shows only its tooltip on focus #45974

@afercia

Description

@afercia

Description

Noticed while debugging #45973

When tabbing through the elements within the main block Inserter, at some point focus goes to a visually hidden 'Close block inserter' button. The button is visually hidden but it still shows its tooltip on focus:

Screenshot 2022-11-22 at 15 57 24

Ideally, for better accessibility, interactive controls should be visible. I do understand why this button is visually hidden but this design pattern is also inconsistent with other panels rendered within the secondary sidebar. For example, the Document overview panel (formerly 'List view') does have a visible close button:

Screenshot 2022-11-22 at 16 34 20

Ideally, this button should be visible.
Alternatively, it should not show a tooltip that visually looks 'detached' from the UI.

Step-by-step reproduction instructions

  • Edit a post.
  • Make sure the editor is in 'Select' mode. This is necessary until Inserter Constrained tabbing doesn't work in Edit mode #45973 gets solved.
  • Open the block inserter and tab through its focusable elements by using the Tab key.
  • Observe that at some point a 'Close block inserter' tooltip appears.
  • Can be reproduced in the site editor and widgets editor as well.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions