From 5b57f2f2eeb30a193ec8f98e0fd2c55e6de22d64 Mon Sep 17 00:00:00 2001 From: Mottie Date: Wed, 13 Nov 2013 16:41:20 -0600 Subject: [PATCH] Add tabIndex option. Fixes #415 --- js/jquery.tablesorter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 6f352fd3..684f46ae 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -41,6 +41,7 @@ // *** functionality cancelSelection : true, // prevent text selection in the header + tabIndex : true, // add tabindex to header for keyboard accessibility dateFormat : 'mmddyyyy', // other options: "ddmmyyy" or "yyyymmdd" sortMultiSortKey : 'shiftKey', // key used to select additional columns sortResetKey : 'ctrlKey', // key used to remove sorting on a column @@ -443,7 +444,7 @@ // add to parent in case there are multiple rows $t.parent().addClass(ts.css.headerRow + ' ' + c.cssHeaderRow); // allow keyboard cursor to focus on element - $t.attr("tabindex", 0); + if (c.tabIndex) { $t.attr("tabindex", 0); } }); // enable/disable sorting updateHeader(table);