index.d.ts 745 B

123456789101112131415161718192021222324252627282930
  1. type FocusableElement = HTMLElement | SVGElement;
  2. export type CheckOptions = {
  3. displayCheck?: 'full' | 'legacy-full' | 'non-zero-area' | 'none';
  4. getShadowRoot?: boolean | ((node: FocusableElement) => ShadowRoot | boolean | undefined);
  5. };
  6. export type TabbableOptions = {
  7. includeContainer?: boolean;
  8. };
  9. export declare function tabbable(
  10. container: Element,
  11. options?: TabbableOptions & CheckOptions
  12. ): FocusableElement[];
  13. export declare function focusable(
  14. container: Element,
  15. options?: TabbableOptions & CheckOptions
  16. ): FocusableElement[];
  17. export declare function isTabbable(
  18. element: Element,
  19. options?: CheckOptions
  20. ): boolean;
  21. export declare function isFocusable(
  22. element: Element,
  23. options?: CheckOptions
  24. ): boolean;