1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
type FocusableElement = HTMLElement | SVGElement;
export type CheckOptions = {
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);
};
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;
export declare function getTabIndex(node: Element): number;
|