Skip to content

Commit bf75800

Browse files
authored
Add cross-table headers attribute example (#1856)
1 parent cf612b9 commit bf75800

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

_rules/table-headers-attribute-refer-to-data-cells-a25f45.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,26 @@ The `td` elements have a `headers` attribute referring to an ID that does not ex
239239

240240
#### Failed Example 2
241241

242+
The `td` elements have a `headers` attribute referring to an ID that exist in a separate `table`.
243+
244+
```html
245+
<table>
246+
<tr>
247+
<th id="headOfColumn1">Projects</th>
248+
<th id="headOfColumn2">Objective</th>
249+
</tr>
250+
</table>
251+
252+
<table>
253+
<tr>
254+
<td headers="headOfColumn1">15%</td>
255+
<td headers="headOfColumn2">10%</td>
256+
</tr>
257+
</table>
258+
```
259+
260+
#### Failed Example 3
261+
242262
The `td` element has a `headers` attribute referring to its own ID.
243263

244264
```html
@@ -254,7 +274,7 @@ The `td` element has a `headers` attribute referring to its own ID.
254274
</table>
255275
```
256276

257-
#### Failed Example 3
277+
#### Failed Example 4
258278

259279
The `headers` attribute on the data cells in the second row refers to an element inside the same `table` which does not have a role of `rowheader` or `columnheader`.
260280

0 commit comments

Comments
 (0)