WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.53k stars 4.21k forks source link

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

Open prajapatisagar opened 21 hours ago

prajapatisagar commented 21 hours ago

Addresses part of #57099

What?

This PR fixes the missing <span class="wp-block-navigation-item__label"> element for navigation items with submenus.

Why?

The absence of the <span class="wp-block-navigation-item__label"> element in navigation items with submenus results in inconsistent markup, potentially impacting accessibility and styling.

How?

The PR adjusts the rendering logic for navigation items with submenus to include the <span class="wp-block-navigation-item__label">.

Testing 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

Testing Instructions for Keyboard

Screenshots or screencast

wp-block-navigation-item__label

github-actions[bot] commented 21 hours ago

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: prajapatisagar <sagarprajapati@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.