Re: Deliverable for Action 72 @headers

Robert J Burns wrote:
> 
> Hi James,
> 
> On Aug 23, 2008, at 10:29 PM, James Graham wrote:
>>
>> I think the absolute simplest message that we can give authors is 
>> "mark up your
>> table headers as <th>". It is then our job to make sure as many tables 
>> at this
>> lowest end of the accessibility learning curve work correctly as 
>> possible.
> 
> Keep in mind that there can be confusion either way in communicating to 
> authors. For example an author drawing data from an SQL database to 
> display in an HTML5 table will think of some of the headers as data. For 
> example consider a table of data on employees for a company.
> 
> <!DOCTYPE html>
> <table>
> <tr><th>Name</th><th>Hire Date</th><th>Pay grade</th><th>Employee 
> ID</th></tr>
> <tr><th>James</th><td>2004-01-22</td><td>A</td><td>1234567</td></tr>
> <tr><th>Rob</th><td>2005-07-12</td><td>C</td><td>7654321</td></tr>
> <tr><th>Gez</th><td>2006-08-02</td><td>B</td><td>3122222</td></tr>
> </table>
> 
> While authors can follow your advice and markup the names with TH 
> elements, this may also be confusing because the authors think of those 
> as data (key data as Al suggested), but data nonetheless.

That's a fair point; I think many authors are inclined to mark things up 
as you suggested. However it still seems much easier for an 
accessibility-conscious author to change the <td> in the first row to 
<th class="rowheading"> and style the class as they want rather than add 
a headers attribute to every cell and an id attribute to every heading. 
Moreover from the testing that Gez and others did it appears that AT 
already deals with this case by assuming that the first column of the 
table contains useful information even if it is not marked up as a <th>.

> There may be other small issues with marking up data as headers, but 
> another one is that the TH elements normally do not get headers 
> associated with them too. So if the user is at the Gez cell, that user 
> cannot query to get headers for that Gez data (i.e., "Name" in this case).

That works in my suggested algorithm with the addition of scope="col" to 
the <th>Name</th>.

As I have said before I am interested to see user testing to determine 
which algorithms work best for tables of the sort that users encounter 
in the real world, not the tiny subset of tables designed by 
"accessibility experts".

-- 
"Mixed up signals
Bullet train
People snuffed out in the brutal rain"
--Conner Oberst

Received on Tuesday, 26 August 2008 09:24:35 UTC