W3C home > Mailing lists > Public > public-html@w3.org > February 2009

Re: Table feedback

From: Ben Millard <cerbera@projectcerbera.com>
Date: Mon, 2 Feb 2009 15:24:30 -0000
Message-ID: <54CF99F0BD79467B97FFCF8FD32C343C@ben9xr3up2lv7v>
To: "Ian Hickson" <ian@hixie.ch>, "Aaron Leventhal" <aleventh@us.ibm.com>
Cc: "HTMLWG" <public-html@w3.org>

Ian Hickson wrote:
> For example, in this table:
> <http://james.html5.org/tables/table_inspector.py?algorithm=html5c&uri=&input_type=type_source&source=%3Ctable%3E%0D%0A%3Ctr%3E%3Cth%3Ea%3Ctd%3Ed%3Ctd%3Eg%0D%0A%3Ctr%3E%3Ctd%3Eb%3Ctd%3Ee%3Ctd%3Eh%0D%0A%3Ctr%3E%3Ctd%3Ec%3Ctd%3Ef%3Ctd%3Ei%0D%0A%3C%2Ftable%3E>
> ...the data cells have no headers, but in the old algorithm, the "a"
> header cell would apply to at least some data cells.

I haven't come across tables of type "<th> only in top left cell" before 
now. Where did you find them?

For those not on #whatwg, there's some discussion about the example table 
here (ending after 11:42):


Here's the example using Smart Headers:


Applying scope="rowgroup" to that cell is one way authors can make the 
original example work in either algorithm.

Smart Headers with scope=rowgroup:
HTML5 with scope=rowgroup:

Hixie, what were the other table types? Your statement "the algorithm is 
likely going to support far fewer table types" makes it sounds like *most* 
data table accessibility from the previous HTML5 algorithm has been lost in 
the new one! :(

Was this a side-effect of my advice or a requirement you've received from 


I did find tables with a <th> as the top left cell but they all had <th> 
elements elsewhere in the table. The main types were:

1. <th> cells across the first row(s).
2. <th> cells down the first column(s).
3. Both 1 and 2.

The respective expectations of authors for the top-left <th> in those table 
types seemed to be:

1. A column header.
2. A row header.
3. A column header for the row headers (usually).

Neither HTML5 nor Smart Headers implement "expectation 3" for case 3:

HTML5 for Type 3:
Smart Headers for Type 3:

Here's a previous mail from me about "expectation 3" (1st paragraph):


My proposed steps in that message looked good at the time. But the algorithm 
has moved on a lot since then. :)

Your reply to it said:

The heuristics have been updated to handle this case. [...] Basically, it 
just labels all data cells in both directions, to the right and downwards, 
until it hits another header cell.

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

If we must make headers be of one type or the other, I suggest making 
"column header" the default type. In other words:

1. Check if the header cell is a row header using the current rules.
2. If it is not, set it to be a column header by default.

Current text for this is after step 10 in the final list on this page:


Assuming that a header is a column header appears to be current practice on 
Windows. By detecting row headers first, HTML5 is a step ahead of current 

UI Automation type "HeaderItem" always maps to ROLE_COLUMNHEADER, according 
to this document on MSDN:


According to the below links, Firefox uses ROLE_COLUMNHEADER for all header 
cells. It uses neither ROLE_ROWHEADER nor the alias ROLE_TABLE_ROW_HEADER:


All this considered, defaulting to "column header" in ambigious cases seems 
reasonable. But if we can go back to having header cells which do both 
columns and rows, whilst retaining support for the parts of my advice which 
were accepted, that would undo these regressions?

Ben Millard
Received on Monday, 2 February 2009 15:25:51 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:42 UTC