focus-lock
Version:
DOM trap for a focus
23 lines (22 loc) • 468 B
JavaScript
/**
* list of the object to be considered as focusable
*/
export var tabbables = [
'button:enabled',
'select:enabled',
'textarea:enabled',
'input:enabled',
// elements with explicit roles will also use explicit tabindex
// '[role="button"]',
'a[href]',
'area[href]',
'summary',
'iframe',
'object',
'embed',
'audio[controls]',
'video[controls]',
'[tabindex]',
'[contenteditable]',
'[autofocus]',
];