Skip to content

Navigation block: Current menu item and ancestor class inconsistent application #50069

Closed

Description

@webmandesign

Description

In Navigation block the current-menu-item class is being applied on the menu li tag. However, the current-menu-ancestor class is being applied on li > a tag.

Please fix the application of current-menu-ancestor class and apply it onto the parent li tag, not the anchor tag.

Step-by-step reproduction instructions

Set a Navigation menu block with submenus and visit a page from the submenu. Inspect the classes applied on the Navigation block list items.

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.2, Gutenberg 15.6.2

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

Activity

  1. added
    [Block] Navigation
    [Block] Submenu
    on Apr 26, 2023
  2. jordesign commented on Jul 20, 2023

    @jordesign
    Contributor

    I've confirmed this behaviour in testing.

    Screenshot 2023-07-20 at 11 37 37 am
  3. added
    [Type] Bug
    [Feature] Navigation Menus
    on Jul 20, 2023
  4. added
    [Status] In Progress
    on Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Block] Navigation[Block] Submenu[Feature] Navigation Menus[Status] In Progress[Type] Bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions