#1903 XHTML Issue: <tfoot> Has to be Before <tbody>

v4.1.3
open
nobody
None
2
2008-11-17
2008-02-14
KosherJava
No

In functions_print_lists.php <thead> <tfoot> and <tbody> tags are used twice. In the HTML spec, the <thead> and <tfoot> tags have to occur before the <tbody> so that the browser can render them even before the full body content is available. In both cases that we use these tags, we display the <tfoot> after the <tbody> and this causes validation errors. Since we use this for table summaries, and the summary data is often not available before the <tbody> is generated, it is understandable why it is done, but if there is an efficient way to doing it properly, we should.
See http://www.w3schools.com/tags/tag_tfoot.asp

Discussion

  • Greg Roach

    Greg Roach - 2008-02-14

    Logged In: YES
    user_id=1466942
    Originator: NO

    The print_????_list functions all work from arrays of data. The only information we don't have for the footer is the number of hidden/displayed records.

    Instead of filtering the records one-by-one as we work through the <tbody>, we could very easily do the filtering beforehand. This would let us display <thead><tfoot><tbody> in the right sequence.

     
  • Gerry Kroll

    Gerry Kroll - 2008-02-14

    Logged In: YES
    user_id=1198414
    Originator: NO

    I think the <tfoot> tag needs to be where it is so that the table sort feature will work. I haven't looked into the code, but that's my suspicion.

    We've had this discussion before: Why do we need to worry about the w3 validation reporting errors, when the application works?

     
  • KosherJava

    KosherJava - 2008-02-15

    Logged In: YES
    user_id=634811
    Originator: YES

    Gerry,
    I added this as a low priority as a tracking item. Often something invalid will lead to other unexplained issues, so when we can we try to validate. The <tffoot> tag should properly render after the <tbodt> even when placed before it.

     
  • Gerry Kroll

    Gerry Kroll - 2008-02-15

    Logged In: YES
    user_id=1198414
    Originator: NO

    KJ:
    It's not a question of rendering the <tfoot> </tfoot> in the right place. I think it's more a question of "how does the sortable table feature use this tag?"

    My strong suspicion is that the sortable table feature uses the <tfoot> tag to determine how tall each column is. I'd have to wade through the code to determine this. I don't it's really worth the effort.

     
  • Greg Roach

    Greg Roach - 2008-11-17
    • milestone: --> v4.1.3
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks