can you have elements in ?

can you have elements in ?

oakley808oakley808 Posts: 3Questions: 0Answers: 0
edited October 2010 in General
Hello.
Is it possible to include tags within the ? It seems to break when using a basic initialization

I see the following error in Firebug:
DataTables warning (table id = 'mytable'): Unexpected number of TD elements. Expected 6 and got 4. DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination.

(I'm using datatables 1.7.3, jQuery 1.4.3, jQueryUI 1.8.4)

Eg.
[code]

$(document).ready(function(){
$('#mytable').dataTable();
});




ABC



Row header 1
some info
some info


Row header 2
more info
more info



[/code]

Replies

  • SRussellNSRussellN Posts: 15Questions: 0Answers: 0
    Do you want this functionality?

    http://datatables.net/examples/advanced_init/row_grouping.html
  • oakley808oakley808 Posts: 3Questions: 0Answers: 0
    No. I just need a properly accessible table.
  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Basically no - the tbody must only consider of TD cell. If it's just styling that you want, then you can use CSS with a given class. If it's for syntactic behaviour, then I'm sorry, this is not something DataTables supports at this time.

    Allan
  • seeker136seeker136 Posts: 1Questions: 0Answers: 0
    I would like to add my vote for this feature in future releases of DataTables.
  • camainccamainc Posts: 19Questions: 3Answers: 0
    This seems to be a requirement for screen readers - each row needs to have a row header (TH scope="row").

    Right now, the lack of ability to do this in DataTables.net is causing us major headaches.
  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Hi camainc,

    The ability to have TH elements in the table body is a new feature in DataTables 1.8 (currently in beta). A working example of this is shown here: http://datatables.net/media/blog/beautiful_tables/complete.html .

    Regards,
    Allan
  • camainccamainc Posts: 19Questions: 3Answers: 0
    Thank you, I just found that a few moments ago. I think our whole team breathed a big sigh of relief. We were getting a lot of grief on the accessibility front. This should keep them quiet!

    Thanks for a great tool. I'll be making a donation soon.
  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    edited May 2011
    Heh - good to hear that this will be of use to you :-). I really want DataTables to focus primarily on progressive enhancement and accessibility over any other points, so if you have any other suggestions, please just let me know. I'm looking at ARIA as one possible option to improve accessibility in future.

    Regards,
    Allan
This discussion has been closed.