keys.tabIndex

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.

Description

Browser's 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, focusing 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 documents tab flow.

Type

integer

Description:

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

Default

  • Value: null

Use the same tab index as DataTables (tabIndex)

Examples

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
	}
} );

Related

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