Skip to content

Use heading instead of paragraph for menu title in overlay contents pattern - #109

Merged
carolinan merged 1 commit into
WordPress:trunkfrom
noruzzamans:fix/overlay-contents-heading-level
Sep 28, 2026
Merged

carolinan merged 1 commit into
WordPress:trunkfrom
noruzzamans:fix/overlay-contents-heading-level

Conversation

@noruzzamans

Copy link
Copy Markdown
Contributor

Description

Fixes #101

In the Overlay Contents template part pattern (patterns/overlay-contents.php), the "Menu" title preceding the navigation block was rendered using a paragraph (<p> tag with wp:paragraph block markup).

As identified in #101, because this text introduces and describes the navigation structure directly following it, semantics and document outline guidelines require a heading (<h2>) rather than a paragraph.

Changes:

  • Replaced wp:paragraph with wp:heading in patterns/overlay-contents.php.
  • Rendered <h2 class="wp-block-heading ..."> instead of <p ...>, retaining all existing styling tokens, colors, typography, font size, and translation context.
  • Updated metadata text domain context string from 'Name of the navigation title paragraph' to 'Name of the navigation title heading'.

Testing Instructions:

  1. In the Site Editor, open a template that contains the Navigation block (or open Patterns > Overlay Contents).
  2. Inspect the "Menu" title above the navigation links.
  3. Confirm that it is rendered as an <h2> heading with class wp-block-heading, preserving identical visual styling.
  4. Verify PHP syntax across the theme with php -l patterns/overlay-contents.php.

@github-actions github-actions Bot added the [Area] Patterns Issues or PRs that touch the theme's block patterns. label Sep 25, 2026
@noruzzamans
noruzzamans marked this pull request as ready for review September 25, 2026 04:34
@github-actions

Copy link
Copy Markdown

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: noruzzamans <noruzzaman@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>

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

@carolinan
carolinan merged commit c738c48 into WordPress:trunk Sep 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Patterns Issues or PRs that touch the theme's block patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overlay contents template part uses a paragraph instead of a heading

2 participants