Skip to content

Missing aria-label in nav #8308

@Alena5041

Description

@Alena5041

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

In any docusaurus application including the official docusaurus website (https://docusaurus.io/docs), there are two <nav> elements, that don’t have aria-label.

Reproducible demo

No response

Steps to reproduce

  1. Go to https://docusaurus.io/docs
  2. Open dev tools
  3. Search for <nav> elements (there are 4 <nav> elements in total)
  4. First and second <nav> elements don’t have aria-label

Expected behavior

All <nav> elements have aria-label so that assistive technologies like screen readers can identify unique navigation elements.

Actual behavior

Main navigation and sidebar navigation elements don’t have an aria-label.
Currently, this is causing accessibility issues: https://dequeuniversity.com/rules/axe/4.4/landmark-unique.

Your environment

  • Docusaurus version used: 2.2.0

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executiondomain: a11yRelated to accessibility concerns of the default themegood first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions