New Zealand Government Web Standards

11.2 Mark-up for data and header cells in tables

New standards released

The New Zealand Web Standards 2.0 were released in March 2009 and replace the previous version, the New Zealand Government Web Standards 1.0 (below).  See Meeting the standards for more information.

The Standard

11.2 For data tables that have two or more logical levels of row or column headers, use markup to associate data cells and header cells.

Guide to this standard

There are two techniques for providing the association between header and data cells:

For very complex tables, inconsistencies in the way assistive technologies interpret the scope attribute mean that a 'belt and braces' approach to ensuring accessibility of the table is to use both the "scope" and the "id" and "headers" approaches in the table mark-up.

Complex tables, such as the HTML versions of the printed financial statements from an agency’s annual report, cannot readily be simplified for the web, because they still need to retain their structural integrity in order to be interpreted properly (as financial statements) by sighted users. Use of "id" and "header" attributes at least on <TH> and <TD> cells can ensure that such tables are reasonably accessible for users of assistive technologies as well.

This standard covers the W3C WAI checkpoint 5.2 for NZ government agencies.

Rationale for this standard

Users who rely on assistive technologies, particularly those with visual impairments, can either not see, or have difficulty seeing the structure of a table. In such cases, using mark-up to associate data cells with header cells enable the assistive technology device to describe to the user the structure of a table.