Skip to content

Add a name to the navigation block in the headers #100

Description

@carolinan

What happened?

As part of the accessibility-ready review, "Meaningful landmark roles and names"
https://wpaccessibility.org/docs/accessibility-ready/theme-guidelines/meaningful-landmark-roles/

The requirement reads:
Verify that the landmark region’s accessible name does not include the type of landmark region. E.g. “Primary navigation” is not a good landmark name for nav; “Primary” is better.

Currently, the header parts/patterns does not set a name on the navigation blocks, so the default aria-label "Navigation" is used.

Current code:
<!-- wp:navigation {"overlay":"navigation-overlay","icon":"menu","fontSize":"small"} /-->

Example with label:
<!-- wp:navigation {"overlay":"navigation-overlay","icon":"menu","fontSize":"small","ariaLabel":"Primary"} /-->

  • With translatable text, of course.

Where does it happen?

On the site (front end)

Steps to reproduce

View the code of the navigation block on the front of the site, or check the accessible name using your preferred tool, for example the accessibility panel in your browser's developer tools.

Screenshots or screen recording

No response

WordPress version

7.2

PHP version

8.2

Ipsum version

trunk

Gutenberg plugin version

No response

Browser and device

No response

Before you submit

  • I searched the existing issues and this bug hasn't been reported yet.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions