What is a Table?
A Table is a way to arrange information into rows and columns. There are many different ways to present information in tables, but in accessible HTML, this is limited to only certain uses.
|Captions||Tables have captions. The caption for this table is Example Table|
|Headers||The headers may be the First Row, First Column, or Both.|
|Layout||Tables should not be used for layout purposes.|
When to Use and Not Use Tables
Tables can be used for both simple and complex presentation of data. However, the complexity of tables on a website should be kept as simple as possible due to potential accessibilty issues. Tables should not be used for layout. That is, do not use tables to make information appear in certain parts of the screen or with certain effects.
Accessibility and Tables
Accessibility limits the potential flexibility of tables because tables are often used for visual effects and such concepts may not exist for non-sighted users. For this reason, accessibility provides additional tools to communicate what is going on to allow for more complexity and these tools must be used. The following rules should be followed when creating tables:
Tables must have a caption.
- Captions are essentially a heading for the table itself.
Tables must have a summary.
- Recent amendments to the accessibility requirements have removed the requirement for table summaries.
- Table summaries are no longer required.
Do not use tables for layout.
- Tables can make the presentation and flow of information for a sighted user easier, but this makes it harder for any other use.
- There are other ways to have the same effect as a table without being a table.
Alternatives to Tables
There are better ways to create layout than using tables. Tables communicate specific information about content that does not apply to data tables. This alternative functionality is currently being improved on the website and this section will be updated to better explain the alternatives.