Skip to content

Submenu closes while focus is on parent link #50744

@jeryj

Description

@jeryj

Description

The Interactivity API for the Navigation block closes the submenu of a parent when focus remains on the parent. Without the Interactivity API, the submenu will remain open while focus is on the parent link.

Step-by-step reproduction instructions

  1. Have a navigation with a submenu
  2. Go to the frontend of the site
  3. Use the keyboard to place focus on the submenu chevron icon
  4. Press enter to open the submenu
  5. Press shift + tab to return focus to the parent link

Without the Interactivity API, the submenu remains open when focus is on the parent link.
With the Interactivity API, the submenu closes when focus is on the parent link.

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

    [Block] NavigationAffects the Navigation Block[Feature] Interactivity APIAPI to add frontend interactivity to blocks.[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions