[whatwg] Early feedback on header association algorithm
aaronlev at moonset.net
Tue Dec 2 00:39:06 PST 2008
Maybe there is a deeper problem if copy & paste doesn't work right
because of IDs?
Or maybe there should be a node.getDescendantById() method?
I don't know. It just seems odd to implement something special here for
On 11/22/2008 3:06 PM, Henri Sivonen wrote:
> On Nov 22, 2008, at 15:50, Henri Sivonen wrote:
>> On Oct 29, 2008, at 19:43, Aaron Leventhal wrote:
>>> 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."
>> While implementing a special lookup method is something that one
>> would want to avoid, using getElementById has two problems:
>> 1) It makes the association brittle under copy and paste. Consider a
>> case where a page author creates a table with internal id references
>> and then a maintainer duplicates the table and edits the contents of
>> the copy table. Now the table coming later in the document order is
>> inaccessible but this brokenness is unobvious to a person who isn't
>> accessing the page with AT.
>> 2) It makes the reporting of table relationships not form a coherent
>> table. Consider a program that instead of allowing the user to
>> traverse the table an arc at a time tries to pull all the arcs from
>> the accessibility API and reconstruct the table in its own process
>> space. If there are arcs between tables, the result is not a table
>> structure at all.
> Oops. I didn't read the text I quoted properly. Sorry. #2 was already
> dealt with.
> However, wouldn't testing if the cell is in the current table already
> go a long way towards the complexity of implementing
More information about the whatwg