Write chart alt text with AI
Draft accessible figure descriptions from the chart code, nearby explanation and caption. Review a single plot or audit figures across a Quarto or pkgdown project.
To write chart alt text with AI, point alt-text at the figure and the source that produced it. A reader who cannot see a pair of crossing lines needs more than the words “line chart”. The variables, time period and relationship that the author intended to show can often be found in the code and surrounding discussion.
The existing caption matters too. If it already states the main result, the alternative can explain the structure of the comparison. If it merely labels the figure, the alternative may need to carry more of the message. Check the wording against the rendered plot and avoid turning an observed change into an unsupported causal claim.
What it does
- Find figures missing an accessible description.
- Draft alternative text from chart code and labels.
- Use the surrounding explanation to identify the main point.
- Complement the caption without unnecessarily repeating it.
- Review one figure or audit a set of project files.
Install and use
- Install the skill in a compatible agent with access to the Quarto or pkgdown project. Use the project's normal tools to render the result.
- Ask “Write alt text for the monthly cost chart. Read the plotting code and caption, and describe only what the evidence supports.”
- Compare the proposed wording with the rendered figure and inspect where it appears in the output.
FAQ
Source
Made by Emil Hvitfeldt. Original skill: alt-text, published on GitHub under the MIT licence.
View on GitHub