It’s 2015, so hopefully web developers know that table elements should not be used for layout. There are many reasons why CSS for layout is better but at the core, HTML tables are data tables; they’ve always been meant for data.
But even today, sometimes a table is used for layout, for whatever reason—time constraints, lack of CSS skills, legacy code, etc.
If a table is used for layout, add ARIA role of presentation to the table element. This will remove the table elements from the Accessibility API which provides for a better user experience for users of assistive technology, particularly screen readers.
Other elements such as caption, summary, and thead should be removed. See the Microsoft resource ARIA Presentation Table Error.
Here’s a code example derived from a W3C example for the use of role=presentation. The following code in the HTML tree:
Becomes this in the accessibility tree:
- Layout tables and repair techniques – Juicy Studio
- See Note under Tabular Data W3C specification
- Layout Tables that are No Longer Read as Data Tables Due to ARIA Role – test case by Pearson Education
- Why accessibility APIs matter by Marco Zehe