General Information
Creating a properly structured data table helps a blind, low-vision and/or screen reader user make sense of a table by reading out the heading titles and then cell content. Data tables have two axes of information. If you only have one axis of information, use a list. Also, do not use layout tables, those are not accessible.
Why is making tables accessible important?
- Tables without structural markup to differentiate and properly link between header and data cells, create accessibility barriers.
- Tables used for layout are frowned upon because unless they are designed correctly they are not considered accessible; many accessibility advocates consider using tables for layout bad practice.
- Accessible tables allows users to perceive, operate understand, access in a robust manner, POUR principles.
How to create accessible tables:
- Make sure your tables have header rows and/or header columns.
- Avoid spanned rows and columns in data tables, especially as headers. Many screen readers cannot properly read these correctly.
- Make sure your header row or header column cells are NOT blank.
- It is okay to have blank data cells, just not a blank header cell.
- Tables without table headings are not accessible.
- Always use the simplest table configuration possible.
- After you’ve created headers, you need to associate the data cells with the appropriate headers.The scope attribute identifies whether a table header is a column header or a row header. < th scope=”col” >Name< /th > or < th scope=”row” >Max< /th >
- Data tables very often have brief descriptive text before or after the table that indicates the content of that table. This text should be associated to its respective table using the < caption > element. The < caption > element must be the first thing after the opening < table > tag.
NEXT PAGE: Accessible Color Contrast