Skip to content

Add accessible name to header navigation blocks - #104

Merged
carolinan merged 5 commits into
WordPress:trunkfrom
shail-mehta:fix/100-navigation-aria-label
Sep 28, 2026
Merged

carolinan merged 5 commits into
WordPress:trunkfrom
shail-mehta:fix/100-navigation-aria-label

Conversation

@shail-mehta

Copy link
Copy Markdown
Member

Description

Fixes #100.

Adds a translatable ariaLabel of Primary to the Navigation block in the header patterns (header-default, header-stick, header-collapsed).

Without an ariaLabel, the block falls back to aria-label="Navigation". Accessibility-ready landmark guidance asks for a name that does not include the landmark type (e.g. Primary, not Primary navigation).

Screenshots
N/A - change is an aria-label on the header <nav>.

Testing Instructions

  1. Activate Ipsum and open the front page with the default header.
  2. Inspect the header <nav> - it should have aria-label="Primary" (not Navigation).
  3. In the Site Editor, switch the header template part to Header Stick, then Header Collapsed; reload the front end and confirm the same aria-label on each.

Use of AI Tools
Cursor (For PR Description)

@github-actions github-actions Bot added the [Area] Patterns Issues or PRs that touch the theme's block patterns. label Sep 24, 2026
@shail-mehta shail-mehta changed the title Fix/100 navigation aria label Add accessible name to header navigation blocks Sep 24, 2026
@shail-mehta
shail-mehta marked this pull request as ready for review September 24, 2026 15:16
@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: shail-mehta <shailu25@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 b0f5764 into WordPress:trunk Sep 28, 2026
6 checks passed
@carolinan

Copy link
Copy Markdown
Contributor

Thank you

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.

Add a name to the navigation block in the headers

2 participants