Keyboard Navigation - have to tab through the empty created inside 'dataTables_scrollBody'

Keyboard Navigation - have to tab through the empty created inside 'dataTables_scrollBody'

deepugndeepugn Posts: 4Questions: 0Answers: 0
edited February 2014 in DataTables 1.9
Hi,
I was working on keyboard accessibility in a application using datatables, but came through the issue of an empty in the case of scroll, and i am forced to tab through the empty theads a number of times equal to the number of columns.

http://datatables.net/forums/discussion/2765/a-side-effect-of-vertical-scroll-feature-creating-two-thead-sections/p1

How can i get around this by setting the tabindex of only the empty to -1 ?

Best Regards,
Deepu.

Replies

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    This is fixed in DataTables 1.10: http://next.datatables.net/examples/basic_init/scroll_y.html .

    Allan
  • deepugndeepugn Posts: 4Questions: 0Answers: 0
    Hi Allan,
    Thanks for the quick reply.

    We have recently upgraded to 1.9.4 from v1.8.1, so what would be the best workaround to fix this while we upgrade to 1.10

    is this as mentioned here the best approach before upgrade, https://datatables.net/forums/discussion/14382/tabindex-declared-on-hidden-header-cells/p1

    "fnDrawCallback": function () {
    $('.dataTables_scrollBody thead th').each(function () {
    $(this).attr('tabindex', -1);
    });
    }

    Best Regards,
    Deepu.
  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    The code you put in above is probably the best fix for 1.9-.

    Allan
  • deepugndeepugn Posts: 4Questions: 0Answers: 0
    Thanks Allan :)
This discussion has been closed.