liveBook · Manning

Table element

As explained in Architecting Accessibility

The HTML table element represents tabular data organized into rows and columns.

When information is easiest to understand in rows and columns, use a native <table> to present it. Browsers and assistive technologies provide built-in support for well-structured tables, helping people review data with its relationships intact. section 6.2

Use <caption> for a table title, <th> for headers, and <td> for data cells. Organize rows with <thead>, <tbody>, and <tfoot>; set scope="col" or scope="row" to clarify which cells a header describes. For complex tables, provide nearby explanatory text and reference it with aria-describedby. section 6.2.2

Choose a table for reading or review, even when it includes controls such as sorting or filtering. A spreadsheet-like experience with two-dimensional keyboard navigation is a grid pattern and requires custom keyboard behavior and focus management. When a table needs horizontal scrolling, contain it in a scrollable component rather than making the whole page scroll in two dimensions. section 6.2 section 6.2.1

How Architecting Accessibility covers it

How deep it goes
Defines captions, headers, data cells, row sections, header scope, and guidance for complex tables.
Examples
Uses timetables, exam results, product comparisons, and an opening-hours table as examples.
What it assumes
Recognize information organized in rows and columns; distinguish reading-oriented tables from spreadsheet-like grids.
What you can do after
Build a semantic data table with a caption, headers, data cells, row sections, and scoped headers.
How it connects
Connects semantic tables with screen readers, assistive technology, data grids, ARIA, and responsive layout.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.