W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2004

Re: Question about tables

From: Charles McCathieNevile <charles@sidar.org>
Date: Tue, 30 Nov 2004 12:48:30 -0600 (CST)
Message-ID: <51684.203.51.174.98.1101840510.squirrel@203.51.174.98>
To: "Becker, Klaus (LNG-MUE)" <Klaus.Becker@lexisnexis.de>
Cc: w3c-wai-ig@w3.org

<quote who="Becker, Klaus (LNG-MUE)">

> maybe my posting belongs to another group (-> xhtml). But it has also a
> reference to WCAG-Guidelines.

Well, it depends on whether you mean "what is the most accessible use..."
But then, so long as validity is considered an aspect of accessibility,
the question makes sense here.

> Ok, I have a question about the use of the elements THEAD, TBODY  and
> TFOOT.
> In the xhtml-dtd the element TABLE is described as followed:
>
> <!ELEMENT table
>      (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
>
> In my opinion, none of the elements THEAD, TBODY  and TFOOT dependent on
> another element. I can use every element as "stand alone" element. On some
> websites (for example: w3c-schools -> xhtml) it is said, that every
> element
> of those three elements is used with each other of those three elements:
> The three Elements can only be used all together and not "stand alone".

The specification says you can choose to have a thead or tfoot
independently of each other. It says that you have to have at least one
tbody. (If I am reading the DTD correctly at 5am). I am not sure why the
W3C Schools site (which is not in any way affiliated to W3C) would say
something different, but I don't see any reason why you cannot use tbody
alone, nor why you cannot use thead or tfoot independently, although it
seems like a good practice in any large table to have the three.

I would follow the advice of the WCAG techniques as being correct.

On the other hand, most HTML browsers are happy to accept tables without a
tbody (or for that matter a lot of other rubbish posing as HTML) so most
authoring tools don't put it in :-(

> But:
> In the document "HTML Techniques for WCAG 2.0" explainded the use of those
> elements as followed:
>
>> Use thead to group repeated table headers, tfoot for
>> repeated table footers, and tbody for other groups of rows.

(This is my early morning advice and may contain traces of nuts)

cheers

Chaals
Received on Tuesday, 30 November 2004 18:49:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:18 GMT