Associating Header Information with Data Cells
If the WTE is configured to render tables as tabular data, the WTE makes an association between header cells and data cells as follows:
- For a given data cell, the HEADERS attribute lists the cells providing pertinent header information. For this purpose, each header cell must be named using the ID attribute. If the HTML element with the specified ID in the HEADERS attribute is outside the table, the WTE generates an authoring error and ignores this ID.
- For a given header cell, the SCOPE attribute informs the user agent of the data cells for which this header provides information. The current version of the WTE does not support the SCOPE attribute.
- The ABBR attribute specifies an abbreviated header for header cells.
- Cells that have the HIDDEN attribute are ignored by the WTE.
- THEAD, TBODY, TFOOT, COL and COLGROUP have no specific influence on the header association, but nonetheless can be containers for all kinds of properties.
In the absence of header information (HEADERS), the list of header cells associated with a data cell will be found with the following algorithm (assume a left-to-right table):
- Search left from the cell's position to find row header cells, and then search upward to find column header cells. The search in a given direction stops when the edge of the table is reached or when a data cell is found after a header cell.
- Row headers are inserted into the list in the order they appear in the table. For left-to-right tables, headers are inserted from left to right.
- Column headers are inserted after row headers, in the order they appear in the table, from top to bottom.
- If a header cell has the HEADERS attribute set, then the headers referenced by this attribute are inserted into the list and the search stops for the current direction.
- Table data cells created by the TD element with the AXIS attribute are also treated as header cells. The current version of the WTE does not support the AXIS attribute.