/** * Trap Tab/Shift+Tab focus inside the card. We listen on the card itself, not * document, so multiple modals/groups don't fight each other. Returns a * disposer that removes the listener. */ export declare function trapFocus(card: HTMLElement): () => void; /** * Focus the first form input field (input/select/textarea) inside the card, * if one exists. We deliberately do NOT auto-focus buttons or links on open — * landing focus on a primary/close button invites accidental activation and * yanks the viewport. When there's no input to fill, anchor focus on the card * itself (tabindex="-1") so the trap has somewhere to start — with * `preventScroll` so anchoring a fieldless modal never jumps the page (and * never fights a stopped Lenis), and with its focus outline suppressed in CSS * (`[aa-modal-name]:focus`) since the card is a non-interactive container, not * a control. The first input keeps its default focus so a below-the-fold field * in a tall scrollable card still scrolls natively into view. */ export declare function focusFirst(card: HTMLElement): void; /** * Apply dialog semantics so assistive tech announces the card as a modal * dialog and treats the rest of the page as inert. Respects author-set `role` * / `aria-modal` / accessible name. When the author hasn't named the dialog, * derive a name from its leading text; if there's no text at all, warn (dev * only) — `aria-modal` without a name announces as an unlabelled "dialog". */ export declare function applyDialogSemantics(card: HTMLElement, debug: boolean): void; /** * Mark the controls that open these modals with `aria-haspopup="dialog"` so * assistive tech announces that activating them opens a dialog. Triggers are * click-delegated and may live anywhere in the document, so match by name. */ export declare function markDialogTriggers(names: Set): void; /** * Document-level Escape listener. Returns a disposer. */ export declare function attachEsc(onEsc: () => void): () => void; //# sourceMappingURL=a11y.d.ts.map