Properly formatted tables ensure that all users can understand your tabular data. By including headers, captions, and alternative text, your tables can convey the critical information to all users.
Use tables for tabular data only—not for layout structure or organization.
A table is a data table when row headers, column headers, or both are present. A data table specifies a row or column with header information about that row/column. For example, here is a simple data table:
In this example, the column headers are Name, Age, and Birthday. The row headers are Jackie and Beth. The caption might be Shelly’s Daughters.
Use the simplest table configuration possible. Avoid nested tables and unnecessary rows and columns. Simple is best.
Designate header row and use captions (alt text) to describe the table.
- Tables should include a caption that describes the contents of the table (e.g. Class Schedule).
- Designate headers (rows and columns). Headings should not contain more than 120 characters.
- Screen readers read tables from left-to-right, top-to-bottom. Screen readers also use header information to identify rows and columns.
- Do not break rows across pages. Set the first row to repeat on each page as the header row.
- Avoid merging cells. If a cell is merged or split, the screen reader loses count and can’t provide helpful information about the table after that point.
- Place title of the table above the table. Make it H1 so it stays with the table.
- Auto fit window -- entire table
Avoid duplication of column headings—each column should have a unique heading.
- Each header column should specify the type of information in the column.
- Ensure sequential headings. Heading levels should not be skipped (e.g. H2 to H4).