@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
28 lines • 1.3 kB
TypeScript
/**
* Is an element focusable? This function performs various tests to see if the element in question
* can receive focus via a pointer. Should skip disabled elements as they are not focusable.
*/
export declare const isMouseFocusable: (element: Element) => boolean;
/**
* Is an element focusable? This function performs various tests to see if the element in question
* can receive focus via the keyboard. Should skip disabled elements as they are not focusable.
*/
export declare const isKeyboardFocusable: (element: Element) => boolean;
/**
* @deprecated Use `isMouseFocusable` for mouse events and `isKeyboardFocusable` for keyboard
* events. `isFocusable` is an alias to `isKeyboardFocusable`
*/
export declare const isFocusable: (element: Element) => boolean;
/**
* Get the first focusable element in a container.
*
* Returns an array of elements if the first focusable element is a radio group
*/
export declare const getFirstFocusableElement: (container: HTMLElement) => Element[] | HTMLElement | null;
/**
* Get the last focusable element in a container.
*
* Returns an array of elements if the last focusable element is a radio group
*/
export declare const getLastFocusableElement: (container: HTMLElement) => Element[] | Element | null;
//# sourceMappingURL=elements.d.ts.map