Re: @headers on th too or just td?

Hi Dan,

On Jun 26, 2008, at 11:55 PM, Dan Connolly wrote:

>
> On Thu, 2008-06-26 at 22:56 +0300, Robert J Burns wrote:
>> HI Dan,
>>
>> On Jun 26, 2008, at 9:49 PM, Dan Connolly wrote:
>>
>>> I did a little investigation into ISSUE-20 table headers...
>>> http://www.w3.org/html/wg/tracker/issues/20
>>> attached are a couple files I was trying to make
>>> into test cases.
>>>
>>> The first one is from relevant WCAG 2 technique that somebody
>>> referred me to...
>>>
>>> H43: Using id and headers attributes to associate data cells with
>>> header
>>> cells in data tables from Techniques for WCAG 2.0
>>> http://www.w3.org/TR/WCAG20-TECHS/H43.html
>>>
>>> I played around with that and validator.nu which led
>>> me to discover that the current HTML 5 draft allows
>>> @headers on td but not on th.
>>>
>>> "The td element may have a headers content attribute specified."
>>> -- http://www.w3.org/html/wg/html5/#the-td
>>> Editor's Draft 25 June 2008
>>>
>>> I suppose that suffices as far as I know... I can't
>>> see any particular reason to use @headers on th, though
>>> this does suggest the example in the WCAG 2 techniques
>>> should get revised.
>>
>> For authoring simplicity headers on TH cells is more important than
>> headers on TD cells. In fact it would be better for document
>> conformance to allow them only on TH cells than to allow them on TD
>> cells. A properly specified data / header cell association algorithm
>> will already associate data cells with the most immediate header
>> cells. Allowing authors to associate those header cells with other
>> header cells means that authors only add the IDREF to a few header
>> cell rather than maybe thousands of data cells.
>
> just when I thought I was starting to understand this stuff...
> now I'm totally confused.
>
> In H43, how would a screen reader know that 15% goes with
> both "Exams" and "1" without a headers attribute
> on the <td>?

The direct answer to your question is that according to HTML 4.01 and  
hopefully also HTML5 no headers attributes would be needed for that  
table. The headers attribute is only necessary for complex tables (and  
for legacy AT support because of poor support for the association  
algorithm).

As Ben Millard and Leif have already suggested there's also a more  
practical use of the @headers attribute that has been implemented by  
AT (on its own I think) that is really what HTML5 should be speccing  
for table associations. That is the heriarchical arrangement of data  
and header cells where, for example, a column of data cells get  
associated with the header cells above them. Then those header cells  
get associated hierarchically with another header cell (separated by  
other data cells). And so on. Though this was a use of headers  
attributes not specced in HTML4 it has become a common authoring  
practice and one supported by AT.

Take care,
Rob

Received on Friday, 27 June 2008 15:17:38 UTC