Col and row spans in tables
Issue: multiple elements in a cell. Paragraphs have been used to separate each date.
Why this is a problem:
-
Cognitive Load: For a screen reader user, the "Date" cell for Congleton library would be read aloud as something like: "Monday 29 September paragraph Monday 27 October paragraph Monday 24 November". This is a long, unbroken string of information that is difficult to parse and associate with the single "Time" entry in the next cell.
-
Loss of Relationship: It creates an ambiguous relationship. Does the "10am to 4pm" time apply to all three of those dates? (In this case, it does, but the structure doesn't guarantee that).
-
Functionality: This structure makes the table data impossible to sort or filter by date, which is a common feature that benefits all users.
Example table
| Venue | Date | Time |
| Congleton library |
Monday 29 September
Monday 27 October
Monday 24 November
|
10am to 4pm
|
WCAG Guideline: This primarily relates to WCAG 1.3.1 Info and Relationships. While the information is present, the programmatic relationships are not as clear as they should be. The structure obscures the one-to-one relationship between a specific date and its corresponding event.
Options
In an ideal situation, each piece of data should be in its own cell (no paragraphs for formatting either).
Example table 2
| Venue | Date | Time |
| Congleton library |
Monday 29 September |
10am to 4pm |
| Congleton library |
Monday 27 October |
10am to 4pm |
| Congleton library |
Monday 24 November |
10am to 4pm |
While fully acessible, this doesn't look great on a long table and can become repetative for assistive technology.
Recommendation: Restructure the Table with 'rowspan'
The best practice is to have one logical piece of data per cell. To handle a venue that has multiple dates, you should give each date its own row and use the rowspan attribute to make the "Venue" and "Time" cells span across those multiple rows.
Code example
<table>
<caption>Example table 3</caption>
<tbody>
<tr>
<th scope="col">Venue</th>
<th scope="col">Date</th>
<th scope="col">Time</th>
</tr>
<tr>
<!-- This cell now spans 3 rows -->
<td rowspan="3">Congleton library</td>
<td>Monday 29 September</td>
<!-- This cell also spans the same 3 rows -->
<td rowspan="3">10am to 4pm</td>
</tr>
<tr>
<!-- The Congleton and Time cells are omitted here because of rowspan -->
<td>Monday 27 October</td>
</tr>
<tr>
<!-- Omitted again -->
<td>Monday 24 November</td>
</tr>
<!-- ... and so on for the rest of the table entries ... -->
</tbody></table>
Example table 3
| Venue |
Date |
Time |
| Congleton library |
Monday 29 September |
10am to 4pm |
| Monday 27 October |
| Monday 24 November |
By giving each date its own row (<tr>) and using rowspan="3" on the "Venue" and "Time" cells, you have created a perfect, unambiguous relationship that assistive technology can understand.
When a screen reader user navigates to the cell containing "Monday 27 October", the software knows that it is still associated with "Congleton library" and "10am to 4pm" because those cells span down to cover that row.
A screen reader might announce this row as:
-
"Row 3 of 4, Date, Monday 27 October"
And if the user asks for the full row context, it will correctly associate the other cells:
-
"Venue: Congleton library, Date: Monday 27 October, Time: 10am to 4pm"
This is a massive improvement over the original, where all dates were read in a single, confusing block.
Page last reviewed: 21 August 2025
Thank you for your feedback.