gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

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

Open MatzeKitt opened this issue 2 years ago • 3 comments

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

MatzeKitt avatar Dec 15 '23 10:12 MatzeKitt

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

getdave avatar Nov 20 '24 14:11 getdave

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

yogendradayal avatar Jul 19 '25 08:07 yogendradayal

It looks to me that this has been fixed within https://github.com/WordPress/gutenberg/pull/67198. At least, my workaround is no more necessary.

MatzeKitt avatar Jul 21 '25 05:07 MatzeKitt