Since: KeyTable KeyTable 2.0.0

Set the table's tab index for when it will receive focus.
Please note - this property requires the KeyTable extension for DataTables.


Browsers have complex built in algorithms that define which element will receive focus when the tab key is pressed by the end user. The tab index attribute for HTML elements can be used to control this behaviour, forcing focus to follow a route defined by the developer rather than the end user. This option can be used to define the tab index of the KeyTable enhanced DataTable in the document's tab flow.




The tab index for the table. Like all other tab indexes, this can be -1 to disallow tabbing into the table.


  • Value: null

Use the same tab index as DataTables (tabIndex)


Take the table out of the normal tab flow in the browser:

$('#myTable').DataTable( {
	keys: {
		tabIndex: 2
} );

Disable tab focus:

$('#myTable').DataTable( {
	keys: {
		tabIndex: -1
} );


The following options are directly related and may also be useful in your application development.