Wikipedia:Manual of Style/Accessibility/Data tables tutorial: Difference between revisions
Content deleted Content added
→Column headers: good example 2: no reason to rowspan |
m →Complex tables: Not just within the table; the HTML 'id' property should be unique on the entire document |
||
Line 276:
When a column header spans two columns, use <code>! scope="colgroup" colspan="2" | </code>. When a row header spans two rows, use <code>! scope="rowgroup" rowspan="2"| </code>.<ref name="H63" group="WCAG"/>
For tables with headers that are more complex, it is recommended to simplify the table or split it up into smaller tables. When this isn't possible, you have to associate each cell to their respective header(s) using the "'''id'''" and "'''headers'''" attributes instead of "'''scope'''". On the headers, set the "id" to an unspaced value that is unique
Below is an example of a complex table with headers that aren't visually clear. Look at the source code of this section to see how each cell's "'''id'''" and "'''headers'''" are defined.
|