W3C home > Mailing lists > Public > public-html@w3.org > June 2008

Re: @headers on th too or just td?

From: Ben 'Cerbera' Millard <cerbera@projectcerbera.com>
Date: Fri, 27 Jun 2008 12:45:16 +0100
Message-ID: <009701c8d84b$47454d10$0a01a8c0@ben9xr3up2lv7v>
To: "Charles McCathieNevile" <chaals@opera.com>, "Dan Connolly" <connolly@w3.org>, "James Graham" <jg307@cam.ac.uk>, "Ian Hickson" <ian@hixie.ch>
Cc: "HTMLWG" <public-html@w3.org>, "WCAG 2.0 Comments" <public-comments-wcag20@w3.org>

Dan Connolly wrote:
> [...] the current HTML 5 draft allows @headers on td but not on th.
> [...]
> [...] I can't see any particular reason to use @headers on th [...]

Chaals wrote:
> [...] There are cases where you have nested headers - i.e. some corner 
> header will apply to the subheaders (th cells) of a row or column. [...]

Heirarchical row headers using <th headers> also exist. There was a thread 
about these in October 2007:

<http://lists.w3.org/Archives/Public/public-html/2007Oct/thread.html#msg159>

An example is the second row of data from this table (and others from that 
website):

<http://www.fbi.gov/ucr/05cius/offenses/expanded_information/data/shrtable_02.html>

Their exhaustive use of headers+id and scope="col" would be unnecessary on 
all other cells thanks to good automatic header association.

Along similar lines, the "Cash flow statement" table on this page:

<http://www.disability.qld.gov.au/budget/06-07/mps/financial.html>

The parent row header of each group ends with ":". It uses <th id>. The 
child row headers within that group point to their parent row header using 
<th headers>. The rest of the table uses plain <th> and plain <td>, so this 
mixes the headers+id mode with auto association.

James Graham, Simon 'zcorpan' Pieters and I wondered about how to do this. 
James's algorithm tries to handle it by applying a per-cell exclusion if the 
headers attribute is present, IIRC:

<http://lists.w3.org/Archives/Public/public-html/2008Mar/0075.html>

There are also tables which use <td scope> and expect it to work. Partly 
because HTML4 advises mixed-purpose cells to use <td>, as Steve Faulkner 
pointed out.

FWIW, this falls under the "allow both to be mixed" aspect of how I think we 
should be approaching accessibility:

<http://lists.w3.org/Archives/Public/public-html/2007Aug/0003.html>

I sent a message in April 2008 querying limitations in the improved (aka 
"cleverer") association algorithm which was added to HTML5:

<http://lists.w3.org/Archives/Public/public-html/2008Apr/0727.html>

The header association algorithm for HTML5 is here:

<http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular.html#header-and-data-cell-semantics>

Ian Hickson promptly responded, saying a burred line between data cells and 
header cells would make tables too confusing for authors and "really wasn't 
worth it":

<http://lists.w3.org/Archives/Public/public-html/2008Apr/0743.html>

The impression I got from my research is that authors are already making 
tables which blur this line (or are oblivious to it):

<http://sitesurgeon.co.uk/tables/>

Ian used whilst doing his own, more extensive research on these issues:

<http://lists.w3.org/Archives/Public/public-html/2008Mar/0215.html>

For the most part, the current algorithm looks like it does a good job of 
figuring out what should be associated with what.

The way forward, imho, is:

* Continued research into making as many of these work as possible.
* Requiring small and simple markup from authors of new tables.
* Supporting existing tables.
* Really bad legacy tables (such as those which use <td> for everything with 
neither scope nor headers+id) may need a few changes to work (such as using 
<th> for their header cells) but this should be minimised where possible.
* Prototype implementations.
* Iterate through ideas and prototypes.
* Assess successes and failures.
* Describe it precisely in a sane amount of spec text.

Perhaps it's impossible to tick *all* the boxes on that list. But I'd like 
to keep trying. Mozilla are sponsoring me to do more work on this and other 
issues:

<http://projectcerbera.com/blog/2008/05#day29>

At the moment, I'm re-organising and rationalising my websites. Once that is 
done, you can expect more noise from me. :)

(I'm not sure when a message is supposed to be hooked up with Tracker.)

-- 
Ben 'Cerbera' Millard
<http://projectcerbera.com/me/> 
Received on Friday, 27 June 2008 11:46:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:18 GMT