Skip to content

fix(theme-classic): remove redundant sidebar label titles#11966

Open
cyphercodes wants to merge 1 commit intofacebook:mainfrom
cyphercodes:cyphercodes/fix-sidebar-title-a11y-11945
Open

fix(theme-classic): remove redundant sidebar label titles#11966
cyphercodes wants to merge 1 commit intofacebook:mainfrom
cyphercodes:cyphercodes/fix-sidebar-title-a11y-11945

Conversation

@cyphercodes
Copy link
Copy Markdown

@cyphercodes cyphercodes commented Apr 27, 2026

Pre-flight checklist

Motivation

Fixes #11945.

WAVE reports redundant title text for docs sidebar labels because the label text is rendered both as visible text and as an identical title attribute. This removes the redundant title attributes from docs sidebar link and category label spans while preserving the existing visible label markup and styling.

AI-assisted: I used AI assistance while preparing this PR and verified the resulting changes locally.

Test Plan

  • YARN_IGNORE_ENGINES=1 yarn test packages/docusaurus-theme-classic/src/theme/DocSidebarItem/__tests__/index.test.tsx --runInBand
  • YARN_IGNORE_ENGINES=1 yarn eslint --cache --report-unused-disable-directives packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsx packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx packages/docusaurus-theme-classic/src/theme/DocSidebarItem/__tests__/index.test.tsx
  • yarn prettier --check packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Link/index.tsx packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx packages/docusaurus-theme-classic/src/theme/DocSidebarItem/__tests__/index.test.tsx

I also attempted YARN_IGNORE_ENGINES=1 yarn workspace @docusaurus/theme-classic build after installing dependencies with scripts disabled, but it could not complete because local workspace packages such as @docusaurus/plugin-content-blog/client and @docusaurus/plugin-content-docs/client had not been built in this checkout.

Test links

Deploy preview: https://deploy-preview-11966--docusaurus-2.netlify.app/

Related issues/PRs

@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label Apr 27, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 27, 2026

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 0a6f8e7
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/69ef215fa87e3300089045dc
😎 Deploy Preview https://deploy-preview-11966--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility: Reduntant title text in sidebar

1 participant