This document is a draft, and is designed to show changes from a previous version. It is presently showing added text,changed text,deleted text,[start]/[end] markers,and Issue Numbers.
Changes are displayed as follows:
HTML, XHTML data tables
This technique relates to:
The objective of this technique is to programmatically associate captions for data tables where captions are provided in the presentation. The caption for a table is a table identifier and acts like a title or heading for the table.
The caption
element is the appropriate markup for such text and it ensures that the table identifier remains associated with the table, including visually (by default). In addition, using the caption
element allows screen reading software to navigate directly to the caption for a table if one is present.
The caption
element may be used whether or not the table includes a summary
attribute. The caption
element identifies the table whereas the summary
attribute gives an overview of the purpose or explains how to navigate the table. If both are used, the caption
should not duplicate information in the summary
.
Although WCAG 2.0 does not prohibit the use of layout tables, CSS-based layouts are recommended in order to retain the defined semantic meaning of the HTML table
elements and to conform to the coding practice of separating presentation from content. If a table is used for layout, the caption
element is not used. The purpose of a layout table is simply to control the placement of content; the table itself is “transparent" to the user. A caption
would "break" this transparency by calling attention to the table.
[1925]
<table> <caption>Schedule for the week of March 6</caption> ...</table>
Resources are for information purposes only, no endorsement implied.
HTML 4.01 Table Captions: The CAPTION element
Check for layout tables: determine whether the content has a relationship with other content in both its column and its row.
If “no," the table is a layout table.
If “yes," the table is a data table.
If the table is a layout table, check that the table does not include a caption
element.
If the table is a data table and it includes a caption
element, check that the caption
identifies the table
If both a summary
attribute and a caption
element are present for this data table, check that the summary
does not duplicate the caption
.
For layout tables, #2 is true.
For data tables, #3 and #4 are true.