File size: 805 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
type FocusableElement = HTMLElement | SVGElement;

export type CheckOptions = {
  displayCheck?: 'full' | 'legacy-full' | 'non-zero-area' | 'none';
  getShadowRoot?: boolean | ((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;