2024-01-05 12:14:38 +00:00
type FocusableElement = HTMLElement | SVGElement ;
export type CheckOptions = {
2026-02-11 16:20:26 +00:00
displayCheck ? :
| 'full'
| 'full-native'
| 'legacy-full'
| 'non-zero-area'
| 'none' ;
getShadowRoot ? :
| boolean
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- there is no overlap here; the function can return true/false/undefined
| ( ( node : FocusableElement ) = > ShadowRoot | boolean | undefined ) ;
2024-01-05 12:14:38 +00:00
} ;
export type TabbableOptions = {
includeContainer? : boolean ;
} ;
export declare function tabbable (
container : Element ,
options? : TabbableOptions & CheckOptions
) : FocusableElement [ ] ;
export declare function focusable (
container : Element ,
options? : TabbableOptions & CheckOptions
) : FocusableElement [ ] ;
export declare function isTabbable (
node : Element ,
options? : CheckOptions
) : boolean ;
export declare function isFocusable (
node : Element ,
options? : CheckOptions
) : boolean ;
2026-02-11 16:20:26 +00:00
export declare function getTabIndex ( node : Element ) : number ;