Complex table examples

Complex tables can be difficult for people using assistive technologies to understand and navigate.

As the number of headers associated with each data cell increases, users must listen to, understand and remember more contextual information while moving through the table.

Some assistive technologies may also present complex header relationships differently, making the experience less consistent. Wherever possible, simplify tables so that each data cell is associated with no more than two headers.

Defining complex

The term complex table does not have one universally accepted definition in accessibility guidance. On this page, a table is considered complex if a data cell needs more than two associated headers: more than one row header, more than one column header, or both.

This distinction matters because the scope attribute can only associate a data cell with one row header and one column header. When additional header relationships are needed, the headers and id attributes become necessary.

This is a structural definition based on the relationships between data cells and their headers. A table can contain many rows or columns and still be considered simple, while a much smaller table can be considered complex if even one data cell requires more than two associated headers.

This page does not cover interactive complexity, such as sortable columns, editable cells or drag-and-drop behaviour. Those features introduce different accessibility considerations and are typically implemented using ARIA grid patterns rather than native tables.

This page does not cover interactive complexity, such as sortable columns, editable cells or drag-and-drop behaviour. Sortable columns can still be built with a native table, using buttons in the column headers and aria-sort. See ARIA table examples. Editable cells and drag-and-drop introduce different accessibility considerations, and may need an ARIA grid pattern, with full keyboard navigation between cells.

Example 1: Complex table

This table is considered complex because each data cell is associated with four header cells instead of a single row header and a single column header.

International and Local revenue
International Local
2023 2022 2023 2022
Revenue from contracts
Rail $2,000,000 $1,900,000 NA NA
Shipping $182,000 $170,000 NA $1,900
Other revenue
Investments $4,000 $1,300 $1,500 NA
Totals $2,186,000 $2,071,300 $1,500 $1,900

Example 2: Simplified table

This table is considered simple because each data cell is associated with only a column header and a row header. This reduces the amount of contextual information users need to understand and remember while navigating the table.

The same information is presented in a simpler structure by repeating some values rather than grouping them under additional headers. This reduces the number of headers associated with each data cell.

International and Local revenue
International
2023
International
2022
Local
2023
Local
2022
Revenue from contracts - Rail $2,000,000 $1,900,000 NA NA
Revenue from contracts - Shipping $182,000 $170,000 NA $1,900
Other revenue - Investments $4,000 $1,300 $1,500 NA
Totals $2,186,000 $2,071,300 $1,500 $1,900

Splitting headers into separate columns, as in this example, can make a table wider. For ways to handle wide tables on small screens and at high zoom levels, see Testing scrollable tables.