mgifford/accessibility-skills/charts-graphs
Claude Code and agent skill by mgifford/accessibility-skills
- community
Checking that the SKILL.md file is still in the repository.
Load this skill whenever the project contains charts, graphs, data visualizations, infographics, or any visual representation of data (bar charts, line charts, pie charts, scatter plots, dashboards). Under no circumstances render a chart without a text alternative, data table, or summary. Prioritize conveying the same information through non-visual means.
Install
npx vskill@latest install mgifford/accessibility-skills/charts-graphsSKILL.md
Charts and Graphs Accessibility Skill
Canonical source:examples/CHARTS_GRAPHS_ACCESSIBILITY_BEST_PRACTICES.mdinmgifford/ACCESSIBILITY.mdThis skill is derived from that file. When in doubt, the example is authoritative.
Apply these rules when creating or reviewing any data visualisation. Only load this skill if the project contains charts or graphs.
Core Mandate
Charts must communicate their information and support their intended tasks without requiring users to perceive a particular colour, inspect a visual position, use a pointer, or understand an unexplained graphic. Accessibility is not one long alt label — use a layered presentation: an understandable visual, a concise summary, structured data when needed, and accessible controls for any interaction. The appropriate depth depends on purpose — a single-value sparkline and an exploratory dashboard don't need the same amount of description.
Start with the user's question before choosing a chart type: what should the chart answer, which comparison/trend/distribution matters, do users need the conclusion, exact values, or exploration? The accessible summary should answer the same question as the visual — don't describe every visual property while omitting the conclusion.
Severity Scale (this skill)
| Level | Meaning | |
|---|---|---|
| Critical | Chart conveys essential data with no accessible alternative whatsoever | |
| Serious | Alternative exists but is incomplete or significantly misleading | |
| Moderate | Alternative present; colour independence or contrast gaps create friction | |
| Minor | Best-practice gap; marginal impact on access |
The Layered Information Model
Provide the layers users need, without duplicating everything into one long accessible name:
- Title — identifies the subject
- Context — scope, dates, units, population, filters
- Summary — the main trend, comparison, or finding
- Structured detail — exact values/categories/relationships when needed
- Source and methodology — lets users evaluate and reuse the information
- Interaction feedback — active filters, selections, loading, errors
Do not put every layer into an image's alt, an SVG <title>, or one aria-label — long accessible names are difficult to review and navigate.
Choosing a representation:
| Need | Suitable starting point | |
|---|---|---|
| One conclusion with few values | Visible text, possibly a simple static chart | |
| Exact comparison across rows/columns | HTML data table | |
| Scalable static chart | SVG, or SVG exported as <img> | |
| Dense rendering with many marks | Canvas + visible HTML summary and data access | |
| User exploration/filtering | Chart + native HTML controls + structured results | |
| Spatial relationships | Map/diagram + equivalent locations/relationships in text |
SVG is not automatically accessible, and canvas is not automatically inaccessible — the implementation must expose equivalent information regardless of rendering technology. If a table or short paragraph answers the question more clearly than a chart, use the simpler representation.
Critical: Every Chart Must Have a Text Alternative
A chart with no text alternative is Critical — blind users and users with images disabled receive no data at all.
Simple chart — concise `alt` for one clear takeaway:
Write the alternative for the chart's purpose in context, not a visual inventory. Avoid: "Chart", "Sales chart", a filename, every axis tick, or an interpretation the data doesn't support. If the surrounding article already states the same finding, keep alt concise rather than forcing a duplicate announcement.
Complex chart — short identification + visible long description:
Make the detailed description visible — this benefits magnification, text-to-speech, translation, and unfamiliar-subject users, not just screen reader users. aria-describedby can associate an image with a plain-text description, but AT generally flattens referenced content into one string — headings, lists, and tables lose navigable structure. Do not use `aria-describedby` as the only route to a structured long description.
Serious: Provide Structured Data When Users Need Values
There is no standards-based threshold requiring a table after a particular number of series or points — provide structured data when exact values or independent comparison are part of the task. For very large datasets, offer a usable filtered table plus a downloadable open format (CSV) — a download does not replace an on-page summary. State how missing, suppressed, estimated, or rounded values are represented.
Serious: SVG Charts
Atomic SVG image — when the chart is exposed as one image:
Do not put `role="list"`/`role="listitem"` on descendants of an SVG whose root has `role="img"` and expect them to remain navigable — the image role represents an atomic graphic and its children are presentational; this is not just inconsistently supported, it contradicts the role="img" semantics.
Structured or interactive SVG — when individual parts must be browsed or operated, do not flatten the whole graphic with role="img". The ARIA Graphics Module defines structured graphic roles, but support must be tested with the project's actual AT combinations. Even when a structured SVG accessibility tree works, still provide a visible HTML summary and data presentation — don't force users to traverse every bar, point, and grid line to discover the conclusion. See skills/svg/SKILL.md for decorative-group exclusion, unique IDs, and DOM order.
Serious: Canvas-Based Charts Require Accessible Alternatives
<canvas> draws pixels — the bitmap exposes no visual objects, labels, or relationships to AT. A chart rendered to canvas with no alternative is Serious at minimum, Critical if it's the only presentation of the data.
Always keep the visual canvas synchronized with an adjacent summary/table — this is the primary, most reliable access route, more so than canvas ARIA alone. Canvas fallback content (focusable descendants mapping interactive regions) requires one-to-one state/focus/hit-region/keyboard synchronization — prefer visible HTML controls outside the canvas unless there's a tested reason to use the fallback subtree. Do not put essential detail only in canvas-drawing commands or library configuration.
Library-specific notes: Chart.js exposes accessibility hooks but its built-in table is a starting point, not a full solution — supplement with an adjacent summary. D3 renders SVG by default, not canvas — use SVG patterns above. Highcharts/Vega-Lite/Observable Plot each have their own accessibility module — check current docs and always supplement with an adjacent data table regardless of library claims. Treat generated ARIA as code your team owns — inspect the browser accessibility tree, don't rely on marketing descriptions.
Serious: Colour and Visual Encoding
Do not use colour as the only way to identify a series, state, threshold, or region — roughly 8% of males and 0.5% of females have colour vision deficiency. Combine colour with: direct text labels, different line styles, point shapes, fill patterns, symbols, boundaries, or explained position.
Colorblind-safe palettes:
- [Okabe-Ito](https://jfly.uni-koeln.de/color/) — recommended default for
quantitative data: #E69F00, #56B4E9, #009E73, #F0E442, #0072B2, #D55E00, #CC79A7, #000000
- [ColorBrewer](https://colorbrewer2.org/) — sequential (ordered data),
diverging (data with a meaningful centre), or qualitative (categorical) palettes with a colorblind-safe filter
Do not rely on a palette merely being described as "colour-blind safe" — test the complete chart including line weight, point size, overlapping marks, selected states, and every supported theme. Simulation is a review aid, not a substitute for standards testing. Avoid: red/green as sole differentiators (the most common CVD combination); saturated rainbow/jet palettes (poor perceptual ordering, uniform to many CVD users).
Contrast: text labels ≥4.5:1 (or 3:1 for large text); required non-text graphical information ≥3:1 against adjacent colour. Decorative grid lines don't become subject to 3:1 merely for appearing in a chart — test only visual information actually required to understand or operate the chart.
Serious: Separate Data Browsing from Actions
Most chart values do not need to be interactive. Provide a summary/table for browsing; reserve buttons, links, and checkboxes for actual actions (filtering, selecting, drilling down). Use native HTML controls for legends and filters:
Do not add every data point to the page's Tab sequence — a chart with hundreds of focus stops is reachable but not practically operable.
Serious: Keyboard Interaction
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/charts-graphs/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mgifford/accessibility-skills/charts-graphs)