Skip to content

Conversation

@dhananjaykuber
Copy link
Contributor

Closes #56040

What?

Adds two new feature to the Navigation block for customizing menu label.

Why?

This PR improves accessibility and flexibility by allowing the open/close button labels to be customized instead of using hardcoded text

How?

  • Adds two new attributes to the Navigation block: menuOpenLabel and menuCloseLabel.
  • Update edit function and frontend rendering of menu label.

Testing Instructions

  • Insert or select the Navigation block.
  • In Inspector Controls head to Display and click on the Display icon button
  • Toggle off the Show icon button
  • Enter Menu open label and Menu close label value
  • See the changes in editor
  • Save the page/post and see changes on frontend

Screenshots or screencast

screen-capture.webm

@github-actions
Copy link

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.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @alaczek.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

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

Unlinked contributors: alaczek.

Co-authored-by: dhananjaykuber <[email protected]>
Co-authored-by: seifeldinio <[email protected]>
Co-authored-by: scruffian <[email protected]>

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

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Navigation Affects the Navigation Block labels Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Navigation Affects the Navigation Block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigation: Customize the "Menu" label.

2 participants