@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
15 lines (14 loc) • 746 B
TypeScript
import type { VisibilityOptions } from './visible';
/**
* Chain focus order between passed elements.
* Passive (should be called inside keyboard event handler)
*/
export declare const handleFocusChain: (e: KeyboardEvent, first: HTMLElement | undefined, last: HTMLElement | undefined) => boolean | undefined;
/** @returns if the element is focusable */
export declare const isFocusable: (el: Element) => boolean;
/**
* Gets keyboard-focusable elements within a specified root element
* @param root - root element
* @param visibilityOpt - visibility check options or false to skip visibility check
*/
export declare const getKeyboardFocusableElements: (root?: HTMLElement | Document, visibilityOpt?: VisibilityOptions | false) => Element[];