Question

Does WCAG 2.0 allow tables for layout, I can't see anything in the guidelines saying you can't but this suprises me.

Was it helpful?

Solution

http://www.w3.org/TR/WCAG20-TECHS/H73.html

Although WCAG 2 does not prohibit the use of layout tables, CSS-based layouts are recommended in order to retain the defined semantic meaning of the HTML table elements and to conform to the coding practice of separating presentation from content

OTHER TIPS

I'd add to @jordan answer that imbricated tables are inaccessible. A layout table must avoid using any element used in data tables, that is:

  • no caption, thead, tfoot and th elements (only table, tr, td and optionally tbody)
  • summary attribute (it can be empty), headers, scope (only rowspan and colspan. And id obviously)
  • strange things like axis or col element

It must also be linearizable, that is, must make sense when cells are read from top to bottom and left to right.

Relevant WCAG 2.0 Failure Techniques are:

Note: if you're using tables only for design constraints, then FYI you can use display: table; (and table-row and table-cell) on every browser except IE6 and IE7.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top