UX Design

Accessible Data Visualization for Colorblind Users

By EZUD Published · Updated

Accessible Data Visualization for Colorblind Users

Approximately 8% of men and 0.5% of women of Northern European descent have some form of color vision deficiency (CVD). Globally, that represents over 300 million people. When charts, graphs, and dashboards rely on color alone to distinguish data series, they become unreadable for this population — and fail WCAG 2.2 SC 1.4.1 (Use of Color, Level A).

Color is an effective visual encoding. The goal is not to remove it but to ensure color is never the only encoding.

Types of Color Vision Deficiency

TypePrevalence (Males)Colors Affected
Deuteranomaly (weak green)~5%Red-green confusion
Protanomaly (weak red)~1.3%Red-green confusion, reds appear darker
Deuteranopia (no green)~1.2%Red-green indistinguishable
Protanopia (no red)~1%Red-green indistinguishable
Tritanopia (no blue)~0.01%Blue-yellow confusion
Achromatopsia (no color)~0.003%All color indistinguishable

Red-green deficiency accounts for over 99% of CVD cases. Any visualization that distinguishes data series using red vs. green without additional encoding is inaccessible to approximately 8% of male viewers.

WCAG Requirements for Visualizations

1.4.1 Use of Color (Level A): Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element.

1.4.11 Non-text Contrast (Level AA): Graphical objects required to understand the content must have a 3:1 contrast ratio against adjacent colors. This applies to chart segments, line weights, and data point markers.

1.1.1 Non-text Content (Level A): Charts need text alternatives — either a summary in alt text, a data table, or both.

Encoding Strategies Beyond Color

1. Shape and Pattern

Use different marker shapes (circles, squares, triangles, diamonds) for scatter plots and line charts. Add patterns (hatching, dots, crosshatch) to filled areas in bar charts and pie charts.

Most charting libraries support custom markers and patterns:

  • D3.js: SVG patterns via <defs> and <pattern> elements.
  • Chart.js: pointStyle property and pattern.js plugin.
  • Highcharts: Built-in pattern fill module.

2. Direct Labeling

Label data series directly on the chart rather than relying on a separate color legend. Place the series name next to its line, inside its bar segment, or adjacent to its slice. This eliminates the need to match colors between the legend and the data.

3. Texture and Stroke Style

Differentiate lines by stroke style: solid, dashed, dotted, dash-dot. Combine with different stroke widths when you have many series.

4. Interactive Identification

On hover or focus, display a tooltip identifying the data series and value. Ensure tooltips are keyboard accessible (reachable via Tab or arrow keys, not hover-only) and announced to screen readers.

5. High-Contrast Color Palettes

When color is used alongside other encodings, choose a palette optimized for CVD:

  • Avoid pure red-green pairs. Use blue-orange, blue-red, or purple-orange as primary contrasting pairs.
  • Use a CVD simulator (Coblis, Sim Daltonism, Stark plugin for Figma) to preview your palette through all CVD types.
  • Pre-built accessible palettes: ColorBrewer (colorbrewer2.org) provides palettes explicitly tested for colorblind safety.
  • Maintain 3:1 contrast between adjacent chart segments per WCAG SC 1.4.11.

Providing Text Alternatives for Charts

A chart that is only an image (<img>) needs meaningful alt text. But alt text has limits — a complex chart with 50 data points cannot be summarized in a sentence.

Tiered Approach

Level 1: Alt text. A concise summary of the chart’s key insight: “Bar chart showing Q3 revenue increased 23% year-over-year, with North America contributing the largest share.”

Level 2: Structured data table. Provide the underlying data in an HTML <table> with proper <th> headers, either visible or available via an expandable “View data table” link.

Level 3: Long description. For complex visualizations, use aria-describedby linking to a detailed narrative description of trends, outliers, and relationships shown in the chart.

SVG Accessibility

For inline SVG charts:

  • Add role="img" to the <svg> element.
  • Provide a <title> element as the accessible name.
  • Provide a <desc> element for a longer description.
  • Alternatively, use aria-label or aria-labelledby on the <svg>.

Common Visualization Accessibility Failures

FailureFix
Red/green status indicatorsUse icons (checkmark/X) alongside color
Pie chart with 8 similar-hue slicesDirect-label each slice; add patterns
Line chart with 5 same-style lines in different colorsUse different stroke styles and marker shapes
Hover-only tooltipsMake tooltips keyboard-accessible
Chart as <img> with no alt textAdd meaningful alt text and a data table
Legend requires color matchingDirect-label series on the chart

Key Takeaways

  • Never rely on color alone to differentiate data — pair color with shape, pattern, labels, or stroke style.
  • Use CVD-safe palettes (blue-orange, not red-green) and verify with color blindness simulators.
  • Provide text alternatives: alt text for the key insight, a data table for full values, and long descriptions for complex visualizations.
  • Chart tooltips must be keyboard-accessible, not hover-only.

Next Steps

Sources

Color vision deficiency prevalence data from the National Eye Institute. WCAG requirements from Success Criteria 1.1.1, 1.4.1, and 1.4.11. Accessible palette guidance from ColorBrewer by Cynthia Brewer.