Table
A table is used to display data.
When to use
- Data with more than one attribute per row, where readers compare down a column.
- Anything a reader will scan for an outlier, which is what columns are for.
When not to use
- A list with one thing per row. That is a list, and a table adds structure that earns nothing.
- Layout. A table is a claim that the data is tabular, and using one for arrangement misleads a screen reader.
- Long text per cell, which stops the columns being scannable.
Guidance
Do
| Queue | Open |
|---|---|
| Billing | 12 |
| Technical | 4 |
Give the table a caption and align a column of numbers to the end, so the figures can be compared down their digits.
Don't
| Queue | Open |
|---|---|
| Billing | 12 |
| Technical | 4 |
Do not leave numbers aligned to the start and the table unnamed. The digits no longer line up and a screen reader has nothing to announce.
Content
What to write, and what to leave out.
- Column labels are nouns and as short as they can be.
- Keep a column to one kind of value, so the whole column can be compared.
- An empty message says why there is nothing, as in No queues yet.