aria.d.ts 1.1 KB

12345678910111213141516171819202122232425
  1. /**
  2. * Determine if the testing element is visible on screen no matter if its on the viewport or not
  3. */
  4. export declare const isVisible: (element: HTMLElement) => boolean;
  5. export declare const obtainAllFocusableElements: (element: HTMLElement) => HTMLElement[];
  6. /**
  7. * @desc Determine if target element is focusable
  8. * @param element {HTMLElement}
  9. * @returns {Boolean} true if it is focusable
  10. */
  11. export declare const isFocusable: (element: HTMLElement) => boolean;
  12. /**
  13. * Trigger an event
  14. * mouseenter, mouseleave, mouseover, keyup, change, click, etc.
  15. * @param {HTMLElement} elm
  16. * @param {String} name
  17. * @param {*} opts
  18. */
  19. export declare const triggerEvent: (elm: HTMLElement, name: string, ...opts: Array<boolean>) => HTMLElement;
  20. export declare const isLeaf: (el: HTMLElement) => boolean;
  21. export declare const getSibling: (el: HTMLElement, distance: number, elClass: string) => Element | null;
  22. export declare const focusElement: (el?: HTMLElement | {
  23. focus: () => void;
  24. } | null, options?: FocusOptions) => void;
  25. export declare const focusNode: (el: HTMLElement) => void;