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

<td scope> and <td> using headers+id> as Table Headers

From: Ben 'Cerbera' Millard <cerbera@projectcerbera.com>
Date: Wed, 23 Apr 2008 19:19:29 +0100
Message-ID: <00b601c8a56e$9414dd00$0301a8c0@ben9xr3up2lv7v>
To: "HTMLWG" <public-html@w3.org>

A few people have e-mailed this year about the absence of scope on the <td> 
element:

<http://www.whatwg.org/specs/web-apps/current-work/multipage/section-tabular.html#the-td>

I  mentioned this on the #whatwg IRC channel:

<irc://irc.freenode.org/whatwg>

Relevant log starts here:

<http://krijnhoetmer.nl/irc-logs/whatwg/20080423#l-973>

Basically, I'm suggesting we allow:

* <td scope> to work like <th scope>.
* <td id> to work like <th id> when the headers attribute points to it.

There are tables which rely on <td scope> to work, so this would support 
existing content. There are various tutorials, recommendations, national 
standards and legal stuff which suggest <td scope> is fine for table 
headers. Usually for row headers, where bold centered text is undesirable. 
So there are of educational resources and established authoring practices 
around these methods.

Removing bold centered text from row headers but not column headers is 
rather fiddly. You can use <thead> and <tbody> sections to style <th> 
differently when a column header or a row header. (This is what I do.) But 
this is beyond the great majority of authors, in my experience. A more 
down-to-earth idea seems to be allowing <td> to act as a header when scope 
or headers+id are used.

Similarly, <td scope="col"> seems a lesser evil than <th style="font-weight: 
normal; text-align: left">. So I suggest the col and colgroup values of 
scope should be allowed on <td> as well as the row and rowgroup values.

I've thought of maybe letting authors literally write <td scope> as an alias 
for <th> but without the centered bold text. This would avoid authors and 
authoring tools getting the value of scope wrong; the author just needs to 
indicate what is a header and the auto algorithm will sort out the rest (for 
regular tables, anyway). Allowing <th scope> to avoid incorrect values also 
seems potentially useful.

Please use this thread to discuss pros, cons, cite example tables from the 
wild and so forth. I don't have a detailed proposal about these things. It's 
just a few ideas I've had during this year for making table accessibility 
easier.

-- 
Ben 'Cerbera' Millard
Collections of Interesting Data Tables
<http://sitesurgeon.co.uk/tables/> 
Received on Wednesday, 23 April 2008 18:20:34 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:54 UTC