Wikipedia:Manual of Style/Accessibility/Data tables tutorial: Difference between revisions
Content deleted Content added
Jroberson108 (talk | contribs) →Complex tables: Display code. |
Jroberson108 (talk | contribs) →Complex tables: Clarify. |
||
Line 276:
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 <code>id</code> and <code>headers</code> attributes instead of <code>scope</code>. On the headers, set the <code>id</code> to an unspaced value that is unique on the page. On the cells that are described by headers, set the "headers" to a spaced list of the describing "id" values in an order that a screen reader should read them.<ref name="H43" group="WCAG">[https://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/H43.html "H43: Using id and headers attributes to associate data cells with header cells in data tables"], accessibility level: A</ref> For example, the following markup has the "Company" header describing the "ABC" company (<code>! id="col1" | Company</code> and <code>| headers="col1" | ABC</code>).
Below is an example of a complex table with headers that aren't visually clear, but uses <code>id</code> and <code>headers</code> instead of <code>scope</code> to associate column and row headers to individual cells. Again, it is recommended to
{| class="wikitable"
|