Repository navigation
Closed
penniger/docusaurus
#1Labels
bugAn error in the Docusaurus core causing instability or issues with its execution
Description
Have 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 clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand 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
The WAVE accessibility tool identifies redundant title text in the sidebar. You can see it on docusaurus.io/docs (see screenshot)
The error goes away if you remove the title from the span.
For example:
From:
<span title="Installation" class="linkLabel_ArQF" style="">Installation</span>
To:
<span class="linkLabel_ArQF" style="">Installation</span>
Reproducible demo
No response
Steps to reproduce
-
Install Chrome extension: WAVE Evaluation Tool
-
Open docusaurus.io/docs
-
Click the Wave icon. Then you should see the alerts in the left side
(btw, you'll see lots of other errors and most are pretty quick to fix, esp with AI 🤠)
Expected behavior
I would expect not to get the alerts because I have to pass an audit.
Actual behavior
alert messages are present and I can fix them locally
Your environment
- Public source code: none
- Public site URL: I showed it on your website. you can also check mine: https://developer.vippsmobilepay.com/docs/
- Docusaurus version used: 3.10
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome 147.0.7727.56
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows 11 Enterprise
Self-service
- I'd be willing to fix this bug myself.
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its execution
Activity
AkshatRaj00 commentedon May 23, 2026
Reproducible Analysis & Proposed Fix 🔍
Hey team! I was able to reproduce this accessibility issue and wanted to share a more detailed root cause analysis along with a concrete fix.
Root Cause
The redundancy happens because Docusaurus sidebar links render both a
titleattribute and visible text with the same string value. Screen readers and tools like WAVE flag this as redundant because thetitletooltip conveys zero additional information over the visible label.The current output looks something like:
The
title="Installation"attribute is completely redundant here — the visible text already says "Installation".Proposed Fix
The cleanest solution is to remove the
titleattribute from sidebar links where the value matches the visible text content. There are two approaches:Option A (Preferred) — Remove
titleentirely from sidebar nav links:If the link text is already fully visible and not truncated,
titleprovides no accessibility value and should be omitted.Option B — Use
titleonly when text is truncated:Apply
titleconditionally using CSSoverflow: ellipsisdetection via JS (ResizeObserver), so it only appears when the text is actually cut off.Why Option A is better
For sidebar navigation, text is rarely truncated. The
titleattribute is a leftover from older UX patterns. Removing it:Files to change
Looking at the Docusaurus codebase, the relevant component is likely:
packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsxpackages/docusaurus-theme-classic/src/theme/NavbarItem/DefaultNavbarItem.tsxI'd be happy to submit a PR for this fix if the team agrees with the approach. The change is minimal but impactful for accessibility compliance audits. 🙏
AkshatRaj00 commentedon May 28, 2026
"Apologies for the duplicate — I missed PR #11966 which was already in review. I should have searched open PRs before submitting. Also acknowledging I used AI assistance which I should have disclosed upfront as per contributing guidelines. Won't repeat this. Thanks for the review."