UNPKG

521 BTypeScriptView Raw
1/**
2 * The helper functions here will make the target element as modal to screen readers, by placing aria-hidden on elements
3 * that are siblings to the target element and the target element's ancestors (because aria-hidden gets inherited).
4 * That way, all other elements on the page are hidden to the screen reader.
5 */
6/**
7 * Call this on a target element to make it modal to screen readers.
8 * Returns a function that undoes the changes it made.
9 */
10export declare function modalize(target: HTMLElement): () => void;