Skip to content

Commit b5c9abe

Browse files
Update table docs and example
1 parent 7ee5841 commit b5c9abe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

design-system-templates/components/table.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
</caption>
55
<thead>
66
<tr>
7+
<td></td>
78
<th scope="col">Column header 1</th>
89
<th scope="col">Column header 2</th>
9-
<th scope="col">Column header 3</th>
1010
</tr>
1111
</thead>
1212
<tbody>
1313
<tr>
14-
<th scope="row">Row 1 header</th>
14+
<th scope="row">Row header 1</th>
1515
<td>Row 1, cell 2</td>
1616
<td>Row 1, cell 3</td>
1717
</tr>
1818
<tr>
19-
<th scope="row">Row 2 header</th>
19+
<th scope="row">Row header 2</th>
2020
<td>Row 2, cell 2</td>
2121
<td>Row 2, cell 3</td>
2222
</tr>

docs/styles/tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The table markup must include column and/or row headers (`<th>`). Some screen re
44

55
Use the attributes `scope="col"` and `scope="row"` to differentiate between column and row headers respectively.
66

7-
Where there are both column and row headers, do not leave the first header cell empty as this can produce unexpected behaviour.
7+
Where there are both column and row headers, do not use an empty table header `<th>` in the first column as this can produce unexpected behaviour. An empty table cell `<td>` is acceptable, if necessary (note the example table which follows).
88

99
Use a `<caption>` to label the table correctly. A heading element can be used within the caption if desired.
1010

0 commit comments

Comments
 (0)