tabIndex
Tab index control for keyboard navigation.
Description
By default DataTables allows keyboard navigation of the table (sorting, paging, and filtering) by adding a tabindex
attribute to the required elements. This allows the end user to tab through the controls and press the enter key to activate them, allowing the table controls to be accessible without a mouse.
The default tabindex is 0, meaning that the tab follows the flow of the document. You can overrule this using this parameter if you wish. Use a value of -1 to disable built-in keyboard navigation, although this is not recommended for accessibility reasons.
Type
This option can be given in the following type(s):
Default
- Value:
0
Example
:
new DataTable('#myTable', {
tabIndex: 1
});
Related
The following options are directly related and may also be useful in your application development.