Data Table Overview
Overview
Tabular representations of data need to use proper HTML markup that communicates to screen reader users the purpose of the table and the structure of the data it contains. Good tables can be navigated and understood easily by screen reader users without confusion.
Benefits to People with Disabilities
- The
summaryattribute oftableelements provides an overview of the body of data in the table to screen reader users. - Screen reader users can effectively understand the structure of data and navigate the table when
thelements are used for header cells. - Screen reader users can easily find and identify data tables on web resources when data tables are preceded by heading elements that inform the title and purpose of the table.
Benefits to All Users
- Users receive better search results when search engines can utilize the summary information contained in the
summaryattribute oftableelements.
Benefits to Developers
- Differentiating styles of header cells and data cells within a table using CSS is easier when
thelements are used for header cells. - Search engines recognize more clearly data organized in tables on web resources.
Related Resources
- 19: HTML tables (Opera Web Standards Curriculum)
- W3C WCAG 1.0 data table techniques
HTML Markup Details
tableelement- The
tableelement is the container for tabular data markup. captionelement- The
captionelement is defined in HTML to provide a visible title for a table, but it has not been widely used by developers and therefore assistive technologies do not support it. summaryattribute- The
summaryattribute, defined in thetableelement, should describe the content of the table or the conclusion the author intends to convey through the data in the table. Assistive technologies use thesummaryattribute as the effective title for a data table. The use of thesummaryattribute should be restricted to data tables and should not be used on layout tables. If more than one data table appears on a page, thesummaryattribute content should be unique to help screen readers users understand how the content of the two tables is different. h2and other heading elements- Heading elements can be used to identify the purpose of a data table and provide a mechanism to navigate to the table.
thandtdelements- The
thelement represents header cells and thetdelement represents data cells. idattribute- The
idattribute, defined forthelements, should uniquely identify each header cell. This id is used in conjunction with the headers attribute oftdelements to indicate headers for a particular data cell. headersattribute- The
headersattribute, defined fortdelements, should point to the id ofthelements that are the header cells for the data cell. scopeattribute- The
scopeattribute, defined fortdandthelements, is not used by assistive technologies to improve accessibility.
Related Accessibility Requirements
- Illinois Information Technology Accessibility Standards
- 11.1 Identify a header cell for each column and row in simple data tables.
- 11.2 Identify relationships in complex data tables using id and headers attributes.
- 11.3 Provide summary attributes for data tables.
- Section 508
- 1194.22 (g) Row and column headers shall be identified for data tables.
- 1194.22 (h) Markup shall be used to associate data cells and header cells for data tables that have two or more logical levels of row or column headers.
- W3C Web Content Accessibility Guidelines 2.0
- 1.3.1 Info and Relationships.
- W3C Web Content Accessibility Guidelines 1.0
- 5.1 For data tables, identify row and column headers. [Priority 1]
- 5.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. [Priority 1]
- 5.5 Provide summaries for tables [Priority 3]
- 5.6 Provide abbreviations for header labels [Priority 3]
