/** * vapor-chamber - status messages for assistive technology. * * `announce(message)` says something to a screen reader without moving focus * (WCAG 4.1.3, status messages): a failed command, a saved form, a page that * changed. Every feature that needs it goes through here, so a document has * ONE pair of live regions (polite, assertive), created on first use, instead * of one per feature. That is the pattern of Angular CDK's LiveAnnouncer and * React Aria's announce(), and the reason a region is not the router's or the * directive's own. * * The library holds no words: what is announced is data (a failure's message, * a backend problem's `detail`, already localized; a page's * title). An app that wants its own words or its own status bar takes the * announcing over with `setAnnouncer(fn)`, and `setAnnouncer(null)` hands it * back. A no-op outside a browser. tests/a11y-announce.test.ts. */ export type AnnounceOptions = { /** Interrupt what is being read (a failure); default polite (a success, a page change). */ assertive?: boolean; }; export type Announcer = (message: string, options: { assertive: boolean; }) => void; /** Say `message` to assistive technology, politely unless `assertive`. */ export declare function announce(message: string, options?: AnnounceOptions): void; /** Take the announcing over (an app's status bar, its words); `null` hands it back. */ export declare function setAnnouncer(fn: Announcer | null): void; //# sourceMappingURL=a11y.d.ts.map