Zum Inhalt springen
BFSG compliance since 2025
WCAG

Accessible Charts and Data Visualizations

13 min read
DatenvisualisierungDiagrammeWCAG 1.4.1FarbkontrastTextalternative

Charts condense complex data into a picture the eye grasps in seconds - one bar is taller, a line rises, a segment is larger. That very visual immediacy becomes a barrier as soon as someone does not perceive the picture as intended: people with a colour vision deficiency cannot tell the red and green line segments apart; screen reader users hear nothing about the content without a text alternative. Around 8% (Colour Blind Awareness) of men and about 0.5% (Colour Blind Awareness) of women have a form of colour vision deficiency - over 300M (Vision Center, 2024) people worldwide. This guide shows how to design charts and data visualizations so they do not rely on colour alone: with patterns and labels, sufficient contrast, text alternatives per WCAG 1.1.1 and an accessible table fallback as a reliable foundation of your accessible web development.

Accessible Chart: Patterns, Labels, Text Alternative and Table FallbackBar chart: revenue per quarterQ1Q2Q3Q412016095180Patterns instead of colour alone plus direct value labelsText alternative (1.1.1)Short alt text plus long descriptionalt: bar chart revenue per quarter in thousand euroHighest value Q4 at 180, lowest Q3 at 95Table fallback: the same data as a tableQuarterRevenue k EURQ1120Q2160Q3 / Q495 / 180Four pillars of accessible data visualisationNot colour alonePatterns, shape, labelContrast 3 to 1Areas distinguishableText alternativealt plus long textTable fallbackRaw data accessibleAround 8 percent of men have a colour vision deficiency (Colour Blind Awareness)

Key takeaways

  • WCAG 1.4.1 requires that colour is not the only means of conveying information - charts also need patterns, shapes or direct labels.
  • A chart is non-text content under WCAG 1.1.1 and needs a text alternative: a short alt text plus, for complex charts, a detailed long description.
  • The table fallback makes the underlying raw data accessible and is often the most robust alternative to a pure image description.
  • Areas and lines need roughly 3:1 contrast against each other so they stay distinguishable for people with colour vision deficiency (WCAG 1.4.11).
  • Automated tools detect only part of these issues - whether a chart is truly understandable only shows in a manual test with keyboard and screen reader.

Why charts so often become a barrier

For sighted users a chart is a highly condensed image: position, length, area and colour carry meaning at once. That very condensation is the problem, because it often relies on a single channel - colour. A line chart with five coloured lines and no other distinction, a traffic-light heatmap of red, yellow and green, a pie chart whose segments differ only by hue: all of this works visually but fails for a substantial share of users. WCAG 1.4.1 Use of Colour therefore requires that colour is not the only visual means of conveying information, indicating an action or distinguishing an element (W3C/WAI).

The data shows how widespread the problem is. In the WebAIM Million report, around 81% (WebAIM Million, 2024) of all home pages analysed in 2024 had text with insufficient contrast - by far the most common detectable error. Overall, 95.9% (WebAIM Million, 2024) of home pages had detectable WCAG failures, on average 56.8 (WebAIM Million, 2024) per page. Colour and contrast are therefore not a fringe issue but the single weakest spot. In Germany this affects many people directly: at the end of 2023 around 7.9M (Federal Statistical Office, 2024) people with severe disabilities lived here, and worldwide around 2.2B (WHO, 2023) people have a vision impairment.

Colour is an addition, not the carrier

Colour may reinforce meaning but should not carry it alone. Whatever differs by colour must also be distinguishable through pattern, shape, position or label. Only then does a chart stay understandable for people with colour vision deficiency or in black-and-white print (W3C/WAI).

Not colour alone: patterns, shapes and direct labels

The most effective lever is dual encoding: every piece of information conveyed through colour is also conveyed through a second channel. In practice these are patterns (dots, hatching, grids) on areas, different line styles (solid, dashed, dotted) and markers (circle, square, triangle) on data points. The most robust is direct labelling at the data point itself: writing the value or category right on the bar or line largely removes the need for a legend and thus for colour mapping. We implement these patterns systematically as part of our services.

Patterns on areas

Bars, segments and areas get a pattern in addition to colour - dots, hatching or grids. That keeps them distinguishable in greyscale too.

Line styles and markers

Lines are drawn solid, dashed or dotted, and data points get different markers such as circle, square or triangle.

Direct labelling

Values and categories sit right on the data point. That replaces the hunt through the legend and removes the need for colour mapping.

Contrast of areas

Adjacent areas and lines need roughly 3:1 contrast against each other so they stand out by lightness, not just by hue.

Safe colour palettes

Palettes are chosen so they stay distinguishable under red-green deficiency too - through lightness differences rather than pure hue shifts.

Meaningful legend

Where a legend is needed, it names the patterns and shapes, not just the colours - and sits close to the chart.

A simple practical test helps reveal a reliance on colour: if you convert a chart to greyscale and can still read it, dual encoding is done right. If segments or lines then become indistinguishable, the second channel is missing. We cover the same logic of distinguishing things by more than colour in detail in our article on colour contrast in accessibility.

The greyscale test

Convert a chart to black and white as a test. If it stays fully readable, the information is not bound to colour alone. If categories blur, patterns, line styles or direct labels are missing - a simple but telling check for WCAG 1.4.1.

Text alternatives for charts per WCAG 1.1.1

A chart is non-text content under WCAG 1.1.1 and therefore needs a text alternative that serves the equivalent purpose (W3C/WAI). For simple charts a short alt text stating the key message is enough - not the appearance. Complex charts such as infographics, trend curves or comparison matrices need more than a short alt text; they need a detailed description that includes all the meaningful information as far as it relates to the purpose of the visualization (W3C/WAI). This long description is ideally visible on the same page so all users benefit from it.

Chart typeSuitable text alternativeCommon mistake
Simple bar/pie chartShort alt text with the key messagealt describes the look instead of the message
Complex line chart/infographicShort alt plus visible long descriptionOnly alt text, no detailed description
Interactive dashboardText alternative plus accessible controlsPure image description without keyboard access
Chart with exact valuesTable fallback with the raw dataValues only in the image, nowhere as text
Purely decorative imageEmpty alt attribute (alt='')Decorative image with invented alt text

The distinction matters: the key message belongs in the short alt text (for example bar chart revenue per quarter, highest value in the fourth quarter), the detail in the long description or the table fallback. An alt text that lists every single value overwhelms and becomes unreadable when spoken; an alt text that only says chart is worthless. Linking image and description cleanly works through mechanisms such as aria-describedby - a technique we place in context in our article on ARIA roles, states and live regions. How alt texts are written well in general is covered in our article on accessible images and alt text.

chart-text-alternative.html
<figure>
  <img src="revenue-quarter.png"
       alt="Bar chart: revenue per quarter in thousand euro,
            highest value in the fourth quarter"
       aria-describedby="chart-desc" />
  <figcaption id="chart-desc">
    Revenue rises from 120 in the first to 160 in the second
    quarter, drops to 95 in the third and reaches its highest
    value of 180 in the fourth. The underlying values are
    listed in the table below.
  </figcaption>
</figure>

The table fallback: making raw data accessible

The most robust alternative to a pure image description is often to offer the underlying data additionally as an accessible table. Where a chart carries exact values - revenues, measurement series, comparison figures - a table is the most precise form of text alternative: it makes every single value accessible, navigable cell by cell with a screen reader, and copyable for further use. For this fallback to truly hold, the table itself must be marked up cleanly - with th, scope and caption, as we describe in detail in our article on accessible data tables and complex content.

Step by step to an accessible chart

  1. 1

    Define the key message

    First clarify which message the chart conveys. That statement belongs in the short alt text - not the appearance of the graphic.

  2. 2

    Build in dual encoding

    Every distinction conveyed through colour gets a second channel: pattern, line style, marker or direct label.

  3. 3

    Check contrasts

    Text, lines and adjacent areas get sufficient contrast - around 3:1 for graphical elements, 4.5:1 for normal text.

  4. 4

    Add a long description

    Complex charts get a visible detailed description, linked for example through aria-describedby.

  5. 5

    Offer a table fallback

    Where exact values matter, add a cleanly marked-up data table with the same data.

  6. 6

    Test with keyboard and screen reader

    Only the manual test shows whether the chart is operable and its message is announced understandably.

Common mistake: values only in the image

If exact figures live only in the graphic, they are lost to screen reader users and cannot be copied. A table fallback or a long description with the concrete values closes this gap. Whether the values are truly accessible only shows in a test with the screen reader.

Chart types and their typical pitfalls

Each chart type brings its own barriers. With a pie chart the risk is that segments stand out only through colour and small shares are barely recognisable; patterns per segment, direct percentage labels at the edge and a limited number of categories help here. Line charts become unreadable as soon as several lines use the same colour family or run close together - different line styles and endpoint labels instead of a pure colour legend are the more robust solution. Bar charts are usually the most straightforward but fail on too little contrast against the background or on values that can only be read by height rather than also being labelled.

Heatmaps and traffic-light displays are a special case because they carry meaning almost entirely through hue - exactly what WCAG 1.4.1 rules out as the sole means (W3C/WAI). Here cells should additionally be labelled or marked with symbols, such as a check mark, an exclamation mark or a value. For scatter plots it is advisable to separate data groups not only by colour but through the shape and fill of the points. In all cases the rule holds: the denser the display, the more important direct labelling and an accompanying table fallback become, so the information comes across fully even without precise colour and detail perception.

Fewer categories, more clarity

Many chart barriers arise from overload: twelve segments in a pie, eight lines in a trend. A deliberate reduction to the truly relevant categories makes a chart not only more accessible but faster to grasp for all users.

Interactive charts and dashboards

Interactive charts - with tooltips, zoom, filters or toggleable data series - are especially demanding because they require operability on top of perceivability. A tooltip that appears only on mouse hover is not reachable by keyboard and violates WCAG 2.1.1 Keyboard. Controls such as filters and toggles need accessible names, a visible focus and a sensible order. We cover the foundations in our articles on keyboard navigation in web development and on screen reader optimization for websites.

Perceivable and operable at once

A static chart must above all be perceivable - through patterns, contrast and a text alternative. An interactive chart must also be fully operable by keyboard and announce its states to assistive technology. Both belong in the plan from the start, not bolted on afterwards.

A proven strategy is to consistently provide a static, fully accessible core for interactive visualizations: the data as a table, the key message as text. The interactivity then improves things for those who can use it - but is not a prerequisite for reaching the information. From supporting 50+ (project experience) projects we know that most chart problems do not arise in the chart itself but in the fact that the raw data is nowhere available as text.

  • Information not conveyed by colour alone (patterns, shape, label added)
  • Adjacent areas and lines distinguishable at roughly 3:1 contrast
  • Short alt text with the key message, not the image description
  • Complex charts given a visible long description
  • Table fallback with the raw data (th, scope, caption) offered
  • Tooltips and controls fully reachable by keyboard
  • Legend names patterns and shapes, not just colours
  • Checked with greyscale test, keyboard and screen reader

A chart is only accessible when its message comes across even without the picture. Whoever just colours it nicely but does not offer the data as text shows figures not everyone can read.

Principle from the audit practice of accessible web development

Accessible data visualization touches above all WCAG 1.4.1 Use of Colour, 1.1.1 Non-text Content and, for graphical elements, 1.4.11 Non-text Contrast (W3C/WAI). Since automated tools can only test about a third to half of the WCAG requirements at all (W3C/WAI), only a manual test reveals whether a chart conveys its message. Building charts from the start with dual encoding, sufficient contrast, a clean text alternative and a table fallback creates a reliable foundation for the WCAG audit - and makes data usable for everyone.

This article is based on data from: W3C Web Content Accessibility Guidelines (WCAG) 2.2, success criteria 1.4.1 Use of Colour, 1.1.1 Non-text Content and 1.4.11 Non-text Contrast, the Images Tutorial and Complex Images from the W3C Web Accessibility Initiative, MDN Web Docs, the WebAIM Million report (2024), Colour Blind Awareness, the Vision Center (2024), the Federal Statistical Office (2024) and the World Health Organization WHO (2023).