[whatwg] Early feedback on header association algorithm
Kristof Zelechovski
giecrilj at stegny.2a.pl
Wed Oct 29 11:46:54 PDT 2008
The problem of table header identifiers is a reflection a general problem of
locality in markup: you cannot use templates without renaming the
identifiers, which is the easy part, and replacing the internal references
to the identifiers, which is the hard part. If you find this remark silly
because a solution is well-known, please forgive my illiterate comment
above; in that case, that solution should be applied.
Chris
-----Original Message-----
From: whatwg-bounces at lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Aaron Leventhal
Sent: Wednesday, October 29, 2008 6:43 PM
To: WHATWG List
Subject: [whatwg] Early feedback on header association algorithm
1. On this part:
"If there is a header cell in the table
<http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.ht
ml#concept-table>
whose corresponding |th
<http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.ht
ml#the-th-element>|
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