[accessibility] Collapsed attribution button should have discernible text
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Hi team,
It seems as though when rendering the collapsed attribution button, the <span> nested within the button has an appropriate title attribute applied to it, but the <button> itself does not. This does not meet WCAG and will fail when running Lighthouse/Axe.
mapbox-gl-js version: 3.2.0
browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Steps to Trigger Behavior
- Load the map at a screen width that renders the collapsed attribution button
- Run Lighthouse/Axe devtools, or inspect the element to see the
<button>element doesn't have discernible text
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
Reproduce the issue by loading the map at a width that renders the collapsed attribution button, then inspect the button with Lighthouse or Axe. Trace the collapsed attribution rendering entry point and ensure the button itself has discernible text; done means the accessibility audit no longer reports this violation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100