W3C home > Mailing lists > Public > www-validator@w3.org > January 2010

Re: [VE][64] document type does not allow element "TFOOT" here

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 6 Jan 2010 20:36:49 +0200
Message-ID: <1D51ABAD1B354784AE570A48F11A8C4E@JukanPC>
To: Dag-Erling Smørgrav <des@des.no>, "David Peabody" <DavidP@smdi.com>
Cc: <www-validator@w3.org>
Dag-Erling Smørgrav wrote:

> "David  Peabody" <DavidP@smdi.com> writes:
>> The only method we have found to overcome this validation error is to
>> place the table footer <tfoot> between the table header <thead> and
>> the table body <tbody> in the HTML code.
> Correct.

Not correct. You can omit the <tfoot> element. It is not obligatory at all, 
in any HTML DTD. This is the best approach in practice. What you do 
otherwise depends on the content and structure, which was not disclosed - 
and it's not a validation issue.

>> Unfortunately, this configuration is not Section 508 Compliant as per
>> U.S. Government regulations concerning electronic data accessibility.
>> When the disabled user employs their screen reader to “listen” to the
>> site they hear the table’s title and/or column heads first <thead>
>> and then the table’s source and footnotes <tfoot> before the table’s
>> main data <tbody>.
> That's a bug in the web client.

No, it is a feature. Such behavior might be undesirable, but it does not 
violate HTML specifications.

>> Does the W3C have suggestions or can they alter their testing methods
>> to discourage this <tfoot> placement because it interferes with
>> disabled users’ accessibility?
> The placement of tfoot between thead and tbody is intentional.

Perhaps, but it's irrelevant in validation. Validation is about what the DTD 
says, not about why it says so.

> It makes it easier for clients to display long tables on paged media
> (provided the table is explicitly sized).

Theoretically perhaps. Popular browsers do a lousy job in pagination of 
pages containing tables, and if they will be improved, let's hope they 
concentrate on important things (like not breaking a table row across 
pages), instead of the rather minor <tfoot> issue.

Let me elaborate on the suggestion of omitting <tfoot>, even though it is 
not really about validation - it does however give some reasons to avoid the 
validation problem in a simple manner.

The <tfoot> element's meaning was never defined in a useful way - it's just 
"table footer", whatever _that_ means, and "the table head and table foot 
should contain information about the table's columns". Why would such 
information be given in a _footer_? Perhaps the footer is supposed to repeat 
the information that has been give in the header, to ease reading the table 
from the bottom row upwards? Perhaps it's supposed to say something else. 
The HTML specifications contain no example of <tfoot>, except extremely 

     <TR> ...footer information...

Whatever you wish to say in <tfoot> is most probably better said
a) before the table, in a separate block, or
b) in the table caption
c) in the <thead> element
d) after the table, in a separate block
e) on the right of the table, placed there with CSS and marked up as in case 
a or b.

None of these approaches causes the validation issue, and you can select 
between them according to the type of information and its role.

Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Wednesday, 6 January 2010 18:37:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:00 UTC