How do I make data tables and size charts accessible?

Published 8 November 2026 · Last updated · General information, not legal advice

To make a data table or size chart accessible, build it as a real HTML table. Mark header cells with th and data cells with td, tell browsers which way each header points with scope, and give the table a short caption. W3C's tables tutorial puts it plainly: "Header cells must be marked up with <th>, and data cells with <td>".1 With that structure, a screen reader can tell a customer that the 92 they just heard is the chest measurement for size M. Without it, they hear a stream of numbers.

Why size charts so often fail

A size chart is a textbook data table: sizes down one side, measurements across the top, a value where they meet. Yet stores often publish them in ways that lose that structure:

  • As an image, often supplied by the manufacturer. A screen reader gets only the alt text, and nobody can enlarge or restyle the numbers. WCAG 1.4.5 Images of Text (level AA) asks that real text is used instead of images of text when the technology can present it.4
  • As a grid of div elements styled to look like a table, with no header relationships.
  • As a table with no headers, where every cell is a td and the top row is just bold.
  • In a pop-up that traps focus or cannot be closed with a keyboard.

This is common across the web. In its 2026 scan of the top million home pages, WebAIM found 948,225 tables, of which 19% had valid data table markup.6 Many of the rest are probably layout tables, but the figure shows how rarely header markup is used.

WCAG 1.3.1 Info and Relationships (level A) asks that structure shown visually can be determined by software.3 W3C's own example for 1.3.1 is a bus timetable whose headers are marked up so assistive technology can match each time to its row and column.3 W3C lists table headers that are not correctly marked up as a failure of this criterion (F91).3

A size chart built properly

Here is a small size chart built the way this post recommends. On a phone, it scrolls sideways inside its own box while the rest of the page stays put.

Women's jumper sizes, body measurements in centimetres
SizeChestWaistHip
S84 to 8866 to 7090 to 94
M89 to 9471 to 7695 to 100
L95 to 10077 to 82101 to 106

The measurements are an illustration, not a sizing standard. What matters is the structure:

  • A caption names the table and its unit. W3C describes the caption as working like a heading for the table, and says it "should be a short heading for the table content".2
  • Column headers (th scope="col") for Size, Chest, Waist and Hip.
  • Row headers (th scope="row") for each size. W3C's tutorial recommends scope for tables with headers in two directions.1
  • Units in the caption or headers, not repeated in every cell.
  • Ranges written as words, "84 to 88", which read more clearly than "84-88".

Rules for any data table

MarkupUse it for
captionA short title for the table, as its first child
th with scope="col"Headers at the top of columns
th with scope="row"Headers at the start of rows
colgroup and scope="colgroup"Headers that span several columns, such as "Inches" over two columns
id and headersComplex tables where headers cannot be matched in a straight line
tdEvery data cell

Sources: W3C tables tutorial1 and caption guidance.2 Keep tables as simple as the data allows. The tutorial covers spanning and multi-level headers, but every extra level makes a table harder to follow by ear.1 And use tables only for data. The tutorial says tables are generally not meant for layout, and W3C lists th elements in layout tables as a failure of 1.3.1 (F46).13

Tables on phones and at high zoom

Wide tables are a classic mobile problem. WCAG 1.4.10 Reflow asks that content works at 320 CSS pixels wide without scrolling in two directions, but data tables are an exception because they need a two-dimensional layout.5 W3C recommends placing the table in its own scrollable container so that the table scrolls, not the whole page, and notes that headings and other content around the table must still reflow.5

If the scrolling container can receive keyboard focus, as in the examples on this page, keyboard users can scroll it with the arrow keys. Give the container a name, such as "Size chart, scrolls sideways", so screen reader users know what it is.

Avoid "responsive" tricks that turn each row into a stacked card using CSS alone, unless you test them with a screen reader and confirm that each value is still read with its headers.

Shopify and WordPress

Shopify

Size charts on Shopify usually live in a page, a product description, a theme block or a size chart app. Whatever tool builds the chart, inspect the result: are the top row and first column th elements? If the chart is an image uploaded by a supplier, retype it as a table. Keep the image only if it adds something, such as a diagram of where to measure, with alt text that explains it.

WordPress and WooCommerce

The WordPress Table block has a "Header section" setting that adds a header section to the table, and a caption option.7 WordPress's documentation also reminds you that tables are best used for tabulated data rather than page design.7 Turn on the header section and add a caption for every size chart. The block does not add row headers by itself, so if the first column holds sizes, check the output or ask a developer to add scope="row"; Website Mechanic can propose that kind of template fix as a pull request.

How to check your tables

  1. Find them. List every size chart and comparison table, including ones inside pop-ups and tabs.
  2. Look for images. Any chart that is a picture of numbers should become a table.
  3. Inspect the markup. Are headers th elements with scope? Is there a caption?
  4. Listen. With a screen reader, move through the table cell by cell. Do you hear the size and the measurement name with each number?
  5. Try a phone. Does the table scroll inside its box without dragging the whole page sideways?

An automated check catches some table markup problems. Jralo's free check tests your homepage and up to five linked pages against WCAG 2.2 A and AA, and helps you understand which countries' accessibility laws may be relevant, with a link to a guide for each (general information, not legal advice). It cannot read a size chart that is an image, or tell whether a caption is meaningful, so automated tools find many problems, not all. For the image side, see how to write alt text that actually helps.

What else do people ask?

Is an image of a size chart with good alt text enough?

Rarely. Alt text cannot sensibly hold dozens of measurements, and an image of text cannot be resized or restyled the way real text can. WCAG 1.4.5 asks for real text instead of images of text where the technology allows it. Put the chart in an HTML table and keep any image for decoration.

Should I use tables for page layout?

No. W3C's tables tutorial says tables are generally not meant for layout, and WCAG lists th elements in layout tables as a failure of 1.3.1. Use CSS for layout and keep table markup for data that really has rows and columns.

What about tables with two levels of headers?

Keep them simple where you can. W3C's tutorial covers headers that span several columns using colgroup and scope, and very complex tables using id and headers attributes. A size chart that needs both inches and centimetres is often clearer as two simple tables or a unit switch.

Check your site now

Jralo's free check tests your homepage and up to five pages for accessibility (WCAG 2.2 A and AA) and website QA problems, and tells you which countries' accessibility laws are likely relevant to you. No sign-up.

Run the free check

Where do these facts come from?

Every number and legal statement in this post links to one of these sources, read on 13 October 2026.

  1. W3C WAI: Tables tutorial
  2. W3C WAI: Tables tutorial, Caption and Summary
  3. W3C WAI: Understanding Success Criterion 1.3.1 Info and Relationships
  4. W3C WAI: Understanding Success Criterion 1.4.5 Images of Text
  5. W3C WAI: Understanding Success Criterion 1.4.10 Reflow
  6. WebAIM: The WebAIM Million, 2026 report
  7. WordPress documentation: Table block

More questions

What should you read next?