Skip to content

Navigation item with sub menu is missing wp-block-navigation-item__label span #57099

Closed

Description

@MatzeKitt

Description

If a navigation item has a submenu, the item itself is missing the <span class="wp-block-navigation-item__label"> around the navigation item text, which makes it harder to style it.

Step-by-step reproduction instructions

  1. Add a navigation block
  2. Add a navigation item to this block
  3. Add a second navigation item to this block
  4. Add a submenu item to the second navigation block
  5. Check the source code

Screenshots, screen recording, code snippet

Bildschirmfoto 2023-12-15 um 11 21 02

Environment info

– WordPress 6.4
– No Gutenberg plugin

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
    [Type] Bug
    on Dec 15, 2023
  2. added
    [Block] Navigation
    on Dec 17, 2023
  3. getdave commented on Nov 20, 2024

    @getdave
    Contributor

    The submenu block should reflect the same markup as the core/navigation-link. This needs a fix.

  4. added
    Good First Issue
    on Nov 20, 2024
  5. yogendradayal commented on Jul 19, 2025

    @yogendradayal

    I'd like to work on this issue. Could you confirm if this still needs fixing and whether my approach below makes sense?

  6. MatzeKitt commented on Jul 21, 2025

    @MatzeKitt
    ContributorAuthor

    It looks to me that this has been fixed within #67198. At least, my workaround is no more necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First Issue[Block] Navigation[Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions