facebook / facebook/docusaurus

Accessibility: docs sidebar: superfluous logo and <aside>

Offen
#8,429 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug domain: a11y
Vorherrschende Sprache
TypeScript
Sterne
66.2k
Forks
10k
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
52

Beschreibung

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).

### Prerequisites

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

### Description

The pseudocode of the docs sidebar (docusaurus website) is:
` [docusaurus logo with tabindex -1] ... `
The effect on the NVDA screen reader is that it reads: "complementary landmark [Docusaurus logo] docs side navigation landmark ..."

First, the logo (if it has tabindex -1 and is not visually present) should not be there, or should be aria-hidden.

Second, the aside element is superfluous. IMO the whole navigation bar incl logo and collapse button should be contained within a single `` element. Putting an additional region around it only clutters the page. Using `` for a navigational sidebar is not common and semantically dubious. Plus, the `` describes the goal of the region much more precisely than ``.

### Reproducible demo

_No response_

### Steps to reproduce

Inspect code of a docusaurus page with docs navigation sidebar

### Expected behavior

Pseudocode should be: `[logo, but only if it is visually present and focusable; aria-hidden otherwise] ... [collapse sidebar button] `

### Actual behavior

pseudocode is: ` [docusaurus logo with tabindex -1] ... [collapse sidebar button] `

### Your environment

_No response_

### Self-service

- [ ] I'd be willing to fix this bug myself.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.