[imps] Table Inspector Bug
Lachlan Hunt
lachlan.hunt at lachy.id.au
Tue Sep 18 07:39:32 PDT 2007
(Resending to the correct mailing list address, sorry for the duplicate
James)
Hi,
There's a strange bug in the Table Inspector [1]. I discovered this
bug while inspecting a table for a TV Guide [2]. When there's a comment
inside a <th>, the associations between cells and headers gets messed
up. Compare the results of the following 2 tables.
In table 1, with the comment, using either the HTML4, HTML5 or
Experemental algorithm:
* Cell A does not get associated with any headers
* Cell B is associated with headers X and ROW
* Cell C is associated with headers Y and ROW
In Table 2, without the comment, the cells are associated as expected.
* Cell A is associated with headers X and ROW
* Cell B is associated with headers Y and ROW
* Cell C is associated with headers Z and ROW
In both cases, the Smart Colspan algorithm behaves the same, except that
it doesn't associate any cells with the header ROW.
Table 1:
<table>
<tr>
<th></th>
<th>X</th>
<th>Y</th>
<th>Z</th>
</tr>
<tr>
<th>ROW <!-- comment --></th>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
</table>
Table 2:
<table>
<tr>
<th></th>
<th>X</th>
<th>Y</th>
<th>Z</th>
</tr>
<tr>
<th>ROW</th>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
</table>
[1] http://james.html5.org/tables/table_inspector.html
[2] http://www.ebroadcast.com.au/tv/static/SydneyNight.html
(Note: unfortunately, that page uses so many layout tables and scripts
to generate its content, it seems to overload the table inspector and is
not possible to analyse the table directly. It works if you serialise
the DOM from the browser and remove the noise, such as font and script
elements, and irrelevant attributes.)
--
Lachlan Hunt
http://lachy.id.au/
More information about the Implementors
mailing list