Accessible Tables on Websites
Whether it’s for course schedules or detailed financial overviews, some information is best presented in tabular form. However, tables can be cumbersome and often display differently on mobile devices compared to PCs. Wide tables frequently break awkwardly, making it unclear which headers belong to each cell. With a few simple rules, however, accessible tables can be created.
For visually impaired individuals, tables can also present a challenge. It must be ensured that a screen reader reads the information in the same order as it is perceived by sighted users. This includes specifying the number of rows and columns. Additionally, the cells must be read with the corresponding row and column headers. To implement accessibility, a distinction is made between simple and complex data tables.
Tables should only be used when data needs to be structured and organized. For layout and purely visual presentations, tables should not be used. In such cases, CSS can be better utilized.
Simple Tables
Simple tables have only one row or column header. To make a table accessible, each table cell must be associated with the appropriate table header. In simple data tables, this can be achieved using the “scope” attribute. The values “row” or “col” can be used to associate all horizontal or vertical cells with a table header.
Day | Time | Course | Instructor |
---|---|---|---|
Monday | 10:00 | Yoga | Anna Müller |
Tuesday | 14:00 | Pilates | Tom Schmidt |
Wednesday | 18:00 | HIIT | Sara Meier |
Complex Tables
Complex tables have more than one row or column header. Here, a clear cell assignment via the “headers” and “id” attributes is required. This ensures that each individual cell can be precisely assigned, which is even more accurate than the “scope” attribute.
Year | Income | Expenses | ||||
---|---|---|---|---|---|---|
Q1 | Q2 | Total | Q1 | Q2 | Total | |
2021 | €10,000 | €12,000 | €22,000 | €8,000 | €9,000 | €17,000 |
2022 | €11,000 | €13,000 | €24,000 | €7,000 | €10,000 | €17,000 |
Checklist - Tables
- Avoid tables that are used solely for the visual presentation of text in columns (layout tables). Instead, use CSS for such presentations.
- Ensure tables are responsive on various devices. Content must not be cut off and should wrap sensibly.
- Ensure that the cells in data tables are associated with the respective row and column headers.
- Use the “scope” attribute or the assignment of “headers” and “id” attributes to associate cells with headers.
- In complex data tables, it is essential to assign each cell using “headers” and “id” attributes, especially when there is more than one row or column header.
By following these guidelines, you can create accessible tables that are usable for all users, including those with disabilities.
© 2024 mtc.berlin | Impressum | Pricacy Policy | Accessibility