1.9 For data tables, identify row and column headers

WAI checkpoint 5.1

Full WAI text: "For data tables, identify row and column headers."

A data table contains information which is presented in tabular format, e.g. financial accounts, timetables, etc. Row and column headers describe the contents of table cells, providing context for the information contained in the table as a whole.

Headers must be defined by inserting the correct HTML attribute, which indicates the table structure in a non-visual way.

Note: Tables are also used to control the layout of images and text on a web page. Tables used solely for this purpose are not data tables and do not require row and column headers.

Rationale

People who can scan a table visually make sense of the information structure by visually comparing row and column headers with the contents of the table cells. However, users of text-only browsers or screen readers rely on the headers to gain an understanding of the table structure.

If headers are not correctly identified in the underlying HTML, the contextual information required to make sense of the structure of a table will be lost when it is read by a text only browser or screen reader, rendering the information in the table useless.

Directions and Techniques

Use the TH and TD HTML attributes to associate table data with table headers

TD is used to create a data cell in a table. TH is used to create column headers. Associate the content in the data cells with the "headers" attribute. TD is used to create a data cell in a table. TH is used to create column headers. Associate the content in the data cells with the ''headers' attribute. See the WAI recommended techniques on using TH and TD to identify table headers

How you could check for this:

Test the page with a screen reader or audio browser

Doing this will tell you if the page is correctly coded as the speech synthesiser will read the contents of the table with the correct structure.

- View WAI checkpoint 5.1