Add tabIndex option. Fixes #415

This commit is contained in:
Mottie 2013-11-13 16:41:20 -06:00
parent c35b7cef9b
commit 5b57f2f2ee

View File

@ -41,6 +41,7 @@
// *** functionality // *** functionality
cancelSelection : true, // prevent text selection in the header cancelSelection : true, // prevent text selection in the header
tabIndex : true, // add tabindex to header for keyboard accessibility
dateFormat : 'mmddyyyy', // other options: "ddmmyyy" or "yyyymmdd" dateFormat : 'mmddyyyy', // other options: "ddmmyyy" or "yyyymmdd"
sortMultiSortKey : 'shiftKey', // key used to select additional columns sortMultiSortKey : 'shiftKey', // key used to select additional columns
sortResetKey : 'ctrlKey', // key used to remove sorting on a column sortResetKey : 'ctrlKey', // key used to remove sorting on a column
@ -443,7 +444,7 @@
// add to parent in case there are multiple rows // add to parent in case there are multiple rows
$t.parent().addClass(ts.css.headerRow + ' ' + c.cssHeaderRow); $t.parent().addClass(ts.css.headerRow + ' ' + c.cssHeaderRow);
// allow keyboard cursor to focus on element // allow keyboard cursor to focus on element
$t.attr("tabindex", 0); if (c.tabIndex) { $t.attr("tabindex", 0); }
}); });
// enable/disable sorting // enable/disable sorting
updateHeader(table); updateHeader(table);