[drupal-devel] [task] Use thead and tbody in theme_table()

Crell drupal-devel at drupal.org
Thu Sep 15 05:23:48 UTC 2005


Issue status update for 
http://drupal.org/node/28777
Post a follow up: 
http://drupal.org/project/comments/add/28777

 Project:      Drupal
 Version:      cvs
 Component:    theme system
 Category:     tasks
 Priority:     normal
 Assigned to:  drumm
 Reported by:  drumm
 Updated by:   Crell
-Status:       patch (code needs review)
+Status:       patch (ready to be committed)

Is this still open?


Patch applies cleanly to HEAD, doesn't break anything, and obeys coding
conventions.  Let's get this one committed.




Crell



Previous comments:
------------------------------------------------------------------------

Fri, 12 Aug 2005 21:44:31 +0000 : drumm

Attachment: http://drupal.org/files/issues/theme.inc_2.diff (1.26 KB)

For extra accessibility and semanticity we should throw in a thead tag
if there is a header row and always put in a tbody tag.




------------------------------------------------------------------------

Wed, 31 Aug 2005 13:57:55 +0000 : Zach Harkey

+1 on the direction. But we also need to add TFOOT.


All themed tables should have the ability to add THEAD [1],TFOOT [2],
and TBODY [3] to support true semantic table building.
[1] http://www.htmlhelp.com/reference/html40/tables/thead.html
[2] http://www.htmlhelp.com/reference/html40/tables/tfoot.html
[3] http://www.htmlhelp.com/reference/html40/tables/tbody.html




------------------------------------------------------------------------

Tue, 06 Sep 2005 20:33:13 +0000 : Dries

Committed to HEAD.  Thanks.


Maybe look into http://drupal.org/node/28777 next?




------------------------------------------------------------------------

Tue, 06 Sep 2005 20:33:54 +0000 : Dries

Never mind my previous comment.  Attached it to the wrong issue.




------------------------------------------------------------------------

Wed, 07 Sep 2005 01:27:15 +0000 : Crell

I would actually say NO to tfoot, on the grounds that the HTML spec is
broken with regards to tfoot.  It doesn't degrade gracefully.  An
unrecognized thead has essentially no effect.  An unrecognized tfoot
means that the footer row gets rendered above the tbody, but if
recognized then it appears after the tbody.  I don't know what W3C
moron came up with that idea, but that's the reason why I never use
tfoot. :-)


Besides, there's no current use of what would go into a footer in
Drupal, as far as I know.  We do, however, already have a $header
parameter, so wrapping that in thead makes sense.  The patch will need
to be updated, though, since http://drupal.org/node/30423 updates this
function as well.


I am curious why the switch from $attributes = NULL to $attribures =
array(), though.  What's the reasoning for that?  (I'm not opposed
necessarily, just curious.)




------------------------------------------------------------------------

Wed, 07 Sep 2005 17:49:08 +0000 : drumm

The attributes argument takes an array so it makes sense to make the
default value an empty array rather than NULL.




------------------------------------------------------------------------

Wed, 07 Sep 2005 20:51:03 +0000 : Dries

Patch no longer applies.




------------------------------------------------------------------------

Wed, 07 Sep 2005 23:27:03 +0000 : drumm

Attachment: http://drupal.org/files/issues/theme.inc_3.diff (1.38 KB)

Updated patch.







More information about the drupal-devel mailing list