Last modified: 2011-11-12 17:53:39 UTC
The caption element must be the first element of a table element: http://www.w3.org/TR/html5/tabular-data.html#the-caption-element {| class="wikitable sortable" |+ CAPTION |- ! THEAD |- | A |- | B |- class="sortbottom" | TFOOT |} is converted to <table class="wikitable sortable jquery-tablesorter"> <thead> <tr> <th class="headerSort" title="Aufsteigend sortieren">THEAD</th> </tr> </thead> <caption>CAPTION</caption> <tbody> <tr> <td>A</td> </tr> <tr> <td>B</td> </tr> <tr class="sortbottom"> <td>TFOOT</td> </tr> </tbody> <tfoot></tfoot> </table> expected result: <table class="wikitable sortable jquery-tablesorter"> <caption>CAPTION</caption> <thead> <tr> <th class="headerSort" title="Aufsteigend sortieren">THEAD</th> </tr> </thead> <tbody> <tr> <td>A</td> </tr> <tr> <td>B</td> </tr> </tbody> <tfoot> <tr class="sortbottom"> <td>TFOOT</td> </tr> </tfoot> </table>
Looks like a bug in JQuery tablesorter , specially the emulateTHeadAndFoot() method.
(In reply to comment #1) > Looks like a bug in JQuery tablesorter , specially the emulateTHeadAndFoot() > method. Yes. It adds the emulated <thead> as the first element, but it should add it after any <caption> instead.
(In reply to comment #2) > (In reply to comment #1) > > Looks like a bug in JQuery tablesorter , specially the emulateTHeadAndFoot() > > method. > Yes. It adds the emulated <thead> as the first element, but it should add it > after any <caption> instead. Is there an upstream bug report for this? (In reply to comment #0) > The caption element must be the first element of a table element Do you have a patch that we could use?
Created attachment 9371 [details] Patch for jquery.tablesorter.js
Thanks for the patch! I'll ask someone to review it as soon as possible. Adding the "patch" and "need-review" keywords to signal that this bug now includes a patch that needs review.
r102301 — also reported upstream
r102303 - QUnit javascript tests.
r102301 should included in 1.18 like Bug 32049.