matplotlib / matplotlib/matplotlib
[Doc]: Add alt text to figures in documentation
@QuLogic is already working on this.
Since Feb 19, 2025.
- Dominant language
- Python
- Stars
- 23.2k
- Forks
- 8.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 66
Description
### Documentation Link
_No response_
### Problem
None of our images have alt-text and that's becoming a standard now and our [communication's guidelines](https://github.com/matplotlib/governance/blob/main/communications_guidelines.md#accessibility) say we should add alt-text when the platform allows.
### Suggested improvement
The steps involved in having a consistent way to add alt text to our docs are
#### code
- https://github.com/matplotlib/matplotlib/pull/21328
- [x] #29649
- [ ] enable support of alt text in [sphinx gallery scraper](https://github.com/sphinx-gallery/sphinx-gallery/blob/e2ecb35d9049d0df0a1db4f6d15be817745cd565/sphinx_gallery/scrapers.py#L89)
- https://github.com/sphinx-gallery/sphinx-gallery/blob/e2ecb35d9049d0df0a1db4f6d15be817745cd565/sphinx_gallery/scrapers.py#L437-L448
- [ ] add passing through alt-text to any file types that support it
- [ ] svg is included in #21328
- [ ] pdf https://github.com/matplotlib/matplotlib/issues/24309#issuecomment-1297192256
#### docs
- [ ] replace [alt text guidelines](https://matplotlib.org/governance/communications_guidelines.html#accessibility) in communication guidelines with a standalone documentation page on alt-text for visualization best practices, update links in communications and pull requests guidelines to post to it.
- [ ] write tutorial on making accessible viz
- [ ] document using alt_aria as part of and alt text and update the [PR template](https://github.com/matplotlib/matplotlib/blob/65c1b89f96f9aff58fd6462429fcd8ff93d3ba51/.github/PULL_REQUEST_TEMPLATE.md) w/ a nudge to use alt text
- [ ] add alt text to gallery files: I do it here in order of visibility, but traffic is probably a better way to prioritize)
- [ ] plot gallery - it feeds the home page gallery so is probably highest profile
- [ ] tutorials - doesn't always have code for the images
- [ ] gallery
- [ ] narrative text
- [ ] older whats news and anything missing from the above
Adding alt text is piles of work and probably would benefit from strategy and partnerships w/ classes/sprints or hiring someone depending on timeline.
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.
Assessment
This issue has not been assessed yet.