`[aria-*]` attributes do not match their roles
Open
Nobody has claimed this yet.
C-bug
- Dominant language
- Rust
- Stars
- 22.2k
- Forks
- 1.9k
- PR merge metrics
- PR metrics pending
Description
Problem
Lighthouse reports the following error:
[aria-*]attributes do not match their rolesEach ARIA
rolesupports a specific subset ofaria-*attributes. Mismatching these invalidates thearia-*attributes. Learn how to match ARIA attributes to their roles.<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar" aria-expanded="false">
Steps
- Go to https://pagespeed.web.dev/
- Enter a mdBook URL, for example https://rust-lang.github.io/mdBook/
Possible Solution(s)
No response
Notes
Related to #1915
Version
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Lighthouse report against the mdBook example URL and trace the generated sidebar-toggle markup shown in the issue. Done means the generated ARIA attributes match the element's role and the Lighthouse accessibility check no longer reports this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- accessibility
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100