question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing aria-label in nav

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Alena5041commented, Nov 30, 2022

Thanks @slorber and @r-lawrence for the quick solution to my issue

2reactions
slorbercommented, Nov 30, 2022

Thanks @Alena5041 and @r-lawrence

Let me know if things are good now or you see any other a11y issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Breadcrumb] Missing aria-label="Breadcrumb" on nav element
Aria label is present on the <nav> tag. Environment. Core Components version 2.3.0. Possible Solution. <nav class="cmp-breadcrumb" data-sly- ...
Read more >
Add missing aria-labelledby to menus and drop nav role ...
This patch will add aria-labelledby to some menus for improved wcag support. Also the nav role="navigation" has been removed to reduce the ...
Read more >
aria-label - Accessibility - MDN Web Docs
The aria-label attribute defines a string value that labels an interactive element.
Read more >
aria-label missing when <label for> present in html?
I just want to have very ordinary label shown within input, no special effects. Thats why I put it outside md-input container. It...
Read more >
ARIA labels | Amber Wilson
Here, an aria-labelledby value of a nav matches the id value of an h2 . The h2 contains human-readable text. It is this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found