[whatwg] Early feedback on header association algorithm

Aaron Leventhal aaronlev at moonset.net
Wed Oct 29 10:43:21 PDT 2008

1. On this part:
         "If there is a header cell in the table 
whose corresponding |th 
element has an ID that is equal to the value of id, then assign the 
first such header cell in tree order to the data cell. "
I don't want to implement a special local table only 
getElementByIdInTable. I'd rather have this reworded to something like
"If there is an element in the document with a corresponding ID (via 
getElementById) equal to the value of /id/, and it is a header cell in 
the current table, then assign it to the data cell."

2. The larger part of algorithm is upside down for our needs. I see a 
use case for providing what headers are associated with a cell, but not 
the other way around. Typically an AT will want to know what labels or 
headers to present to a user when a user navigates to a cell. Therefore, 
I wish the entire algorithm was flipped and tells us what headers are a 
match for a given cell.

3. The one piece of information we do need when we are on a given <th> 
is whether to expose it with ROLE_ROWHEADER or ROLE_COLUMNHEADER in our 
GetRole() implementation. If scope isn't "row", "rowgroup", "col" or 
"colgroup" then we'll need to base that on the position in the table. It 
seems fairly obvious if the <th> is in an edge (but not corner) 
position, but other cases are less obvious.

I haven't gone through the algorithm in fine detail yet, mostly because 
of comment #2. We'd have to turn the algorithm inside out in order to 
evaluate it.

- Aaronj

More information about the whatwg mailing list