[html5] td and th

Luis-Miguel Rodríguez Rojas lmrodriguezr at gmail.com
Tue Apr 5 03:15:25 PDT 2011


On Tue, Apr 5, 2011 at 9:51 AM, Jukka K. Korpela <
jukka.k.korpela at kolumbus.fi> wrote:

> [...] but I think it is rather natural on semantic grounds. [...].
>
Thus, the stricter content model probably helps to detect accidental use of
> <th> where <td> should be used, as well as markup based on misunderstanding
> of HTML semantics [...]
>

That's exactly what I though, and it makes sense for me a <th> element to
have Phrasing content model (both phrasing and flow content models would
have good pros/cons).  However, in practice, I am not sure if it is truly
convenient.

I have one particular example at
http://bioinfo-prod.mpl.ird.fr/xantho/x.org/gui/seqterm.php, for which the
cells in the second row and the first two columns (or at least the second)
could be <th> elements, allowing the definition of scope.  However, they
contain hidden <div> elements*, which are flow content.  This is probably
solvable with <iframe> elements, but this may not be a robust solution,
would it?


> The only potential objection that I can imagine for now is that a table
> header might reasonably act as a tool for sorting or otherwise modifying the
> data in the table or its rendering. [...]. But would it be possible that
> someone reasonably wanted to use a _form_ in a table header cell? I mean a
> form where the user selects a sorting criterion, for example. Perhaps in the
> simplest case, the form might consist of a <select> element and (at least
> when scripting is disabled) a submit button - but to make it work robustly,
> with a server-side backup, it would need to be a <form>.
>

I don't find convenient to place <select> and <button> elements within a
<th>, but not <form>s (at least when no scripting).  Does it mean that the
<form> element should be placed on top of the <table> element?  What if one
wants to define different <form>s for different <th> / <td> elements in the
same <table>?


>
> --
> Yucca, http://www.cs.tut.fi/~jkorpela/
> _______________________________________________
> Help mailing list
> Help at lists.whatwg.org
> http://lists.whatwg.org/listinfo.cgi/help-whatwg.org



* Still, one could argue that hidden <div> elements are not great practice
in terms of accessibility, and I would agree (at least as it is implemented
in my example).

--
Luis M. Rodriguez-R
[ http://thebio.me/lrr ]
---------------------------------
UMR Résistance des Plantes aux Bioagresseurs - Group effecteur/cible
Institut de Recherche pour le Développement, Montpellier, France
[ http://www.mpl.ird.fr/ | Luismiguel.Rodriguez at ird.fr ]
+33 (0) 6.29.74.55.93

Unidad de Bioinformática del Laboratorio de Micología y Fitopatología
Universidad de Los Andes, Bogotá, Colombia
[ http://bioinf.uniandes.edu.co | luisrodr at uniandes.edu.co ]
+57 (1) 3.39.49.49 ext 2777
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20110405/b6a8c9c7/attachment-0003.htm>


More information about the Help mailing list