Missing aria-label in nav
See original GitHub issueHave you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I’m using the latest version of Docusaurus.
- I have tried the
npm run clear
oryarn 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
- Go to https://docusaurus.io/docs
- Open dev tools
- Search for
<nav>
elements (there are 4<nav>
elements in total) - First and second
<nav>
elements don’t havearia-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:
- Created 10 months ago
- Comments:12 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @slorber and @r-lawrence for the quick solution to my issue
Thanks @Alena5041 and @r-lawrence
Let me know if things are good now or you see any other a11y issue