facebook / facebook/docusaurus

Accessibility: docs sidebar: superfluous logo and <aside>

Đang mở
#8,429 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug domain: a11y
Ngôn ngữ chính
TypeScript
Star
66.2k
Fork
10k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
52

Mô tả

### 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.