W3C home > Mailing lists > Public > w3c-wai-gl@w3.org > January to March 2005

Re: CSS rather than layout tables...

From: Michele Diodati <michele.diodati@gmail.com>
Date: Mon, 21 Feb 2005 19:58:37 +0100
Message-ID: <2e1e87c050221105843b92d07@mail.gmail.com>
To: w3c-wai-gl@w3.org

Alistair Garrison wrote:
With CSS now supported (seemingly, enough to rule out the need to use tables
for layout for a number of browsers [http://www.w3.org/Style/CSS/#browsers]
and authoring tools [http://www.w3.org/Style/CSS/#editors]), I would suggest
that the time might have come for WAI to state that the use of tables for
layout should be stopped.

Michele Diodati answers:
In my opinion, this step involves a preliminary clarification: WCAG
2.0 cannot forbid layout tables without explaining very clearly how to
determine wether a table is for data or for layout.

Although it could seem easy distinguishing between the two kind of
tables, it isn't a trivial issue. We can write mixed tables that
contain groups of cells sharing a data type relationship while other
cells, in the same table, share a layout type relationship [1]. In
fact, both data and layout tables use the same HTML elements (at least
TRs and TDs). So, the reader needs to find in the WCAG 2.0 a principle
to use as a method of distinction between layout and data
relationships between different cells, before than between layout and
data tables.

I think that such a principle is the following: in a data relationship
you can't swap the contents of two cells without altering the data
consistency. Instead, in a layout relationship you can swap the
contents of two (or more) cells without problems.

For example, in a three columns/five cells layout table, you can move
the top cell content (usually the header) in the place of the bottom
cell content (the footer), and vice versa. It results in a strange web
page, but you can easily understand the address information moved to
the header; similarly, you can understand the company logo moved to
the footer. Address and logo are independent contents. Surely reasons
exist to usually put logos in the header and addresses in the footer,
but the logic of positioning stands in a place different from the
layout table itself. On the contrary, in a data table, the logic
stands in the table, and is evident. If you have a two columns table,
and the first column is labeled "first name" while the second is
labeled "last name", you can't archive "Abraham Lincoln" putting
"Abraham" in a cell of the second column, and "Lincoln" in a cell of
the first column without destroying the data consistency.

Using a similar criterion, a web developer can distinguish not only
between data and layout tables, but also between data relationships
and layout relationships in the same table.

Michele Diodati

[1] I wrote a tutorial showing a data table, a layout table and a
mixed table. Unfortunately at the moment it is available only in
italian: <http://www.diodati.org/scritti/2004/guida/ele_acc30.asp>.
Received on Monday, 21 February 2005 18:59:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 16 January 2018 15:33:52 UTC