Short sentences and paragraphs over long, complex ones
Expand acronyms on first use, e.g., Web Content Accessibility Guidelines (WCAG)
Visual information is for everyone, even those who cannot see them
Choose alt text based on image type
Decorative → empty alt text (alt="")
Informative → describe the key takeaway
Complex (charts, diagrams) → describe the pattern, not just “a chart”
alt=“Chart type of type of data where reason for including chart” plus link to data source somewhere in the text (Cesal, 2020)
“Scatterplot of flipper length vs body mass across Palmer Penguins where Gentoo penguins show the largest flipper length and the highest body mass.”
But don’t rely on color alone
Make visual output accessible
Package defaults are rarely colorblind-safe
Distinguish data with color, shape, line style, or pattern
Consider adding the data
Data
Comparing wing span vs weight
body
flipper
mass
Species
length
g
avg
sd
avg
sd
Adelie
189.9536
6.539457
3700.662
458.5661
Chinstrap
195.8235
7.131894
3733.088
384.3351
Gentoo
217.1870
6.484976
5076.016
504.1162
AI can help you write your alt text
Writing a good, detailed alt text by hand is slow and easy to forget
With a multimodal LLM, you can generate it automatically from the rendered plot
Use the ellmer package (or the new btw package) to connect to an LLM
generate_alt_text <-function(ggplot_obj) {ggsave(save_path, ggplot_obj) alt_text_chat <-chat_openai_compatible(base_url ="...", model ="...") alt_text_chat$chat("Describe this chart for someone who cannot see it...", content_image_file(save_path))}
Scatterplot of flipper length vs. body mass across three penguin species. Gentoo penguins show the largest flipper length (210–230mm) and highest body mass (4500–6000g)..."
Structured tables transform complex data into navigable, inclusive information