alt-text

Solid

Generate and improve accessible alt text for data visualizations and images in R packages and Quarto documents. Use when the user wants to add, improve, or audit alt text for figures in a pkgdown site or .qmd files. Activate for requests that mention fig-alt, fig.alt, figure descriptions, or alt text in the context of an R package or Quarto document.

Data & Documents 396 stars 34 forks Updated today MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
87
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Write Accessible Alt Text Generate accessible alt text for data visualizations and images in this project. ARGUMENTS - label: (optional) specific figure label or chunk to target - file: (optional) specific file to process ## Detect project type Before proceeding, identify the project context and read the relevant reference. Check for a `_pkgdown.yml` file in the project root to detect a pkgdown site: ```bash ls _pkgdown.yml 2>/dev/null && echo "pkgdown" || echo "not pkgdown" ``` - **pkgdown site** (`_pkgdown.yml` present) → read `references/pkgdown.md` - **Quarto documents** (no `_pkgdown.yml`, `.qmd` files present) → read `references/quarto.md` If the context is still ambiguous, ask the user which format they are working in. ## Key advantage: source code access Unlike typical alt text scenarios where you only see an image, **we have access to the code that generates each chart**. Use this to extract precise details: **From plotting code:** - Variable mappings → exact variable names for axes - Color/fill mappings → what color encodes - Plot type functions → scatter, histogram, line chart, etc. - Trend lines or fitted curves → overlaid statistical fits - Faceting/subplots → number of panels and what varies - Color scales → encoding scheme (sequential, diverging, categorical) - Axis labels and titles → customized labels **From data generation code:** - Random distributions → expected distribution shape - Transformations → what was done to data - Feature engineering...

Details

Author
posit-dev
Repository
posit-dev/skills
Created
6 months ago
Last Updated
today
Language
R
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category