Components
← All components

Announcer

stimeo--announcer

Shared polite/assertive live-region base for screen-reader announcements.

The stimeo--announcer controller provides one pair of polite/assertive live regions other behaviors can lean on instead of each carrying their own. Announce a message via the announce action param (attribute-only) or by dispatching the stimeo--announcer:announce custom event with detail.message (and optional detail.assertive) — handy for Turbo Stream updates and async results. It never moves focus (announcements must not steal it, WCAG 2.2 4.1.3); re-announces identical text by clearing then re-setting so an atomic region speaks again; and auto-clears after clearAfter. If a polite/assertive target is absent it generates a visually-hidden region at runtime. Listeners, timers, and any generated regions are torn down on disconnect (Turbo included). Behavior only — the regions' hidden styling is owned by this Playground.

running

The live regions are visually hidden, so a screen reader announces each message while the transcript below mirrors it for sighted viewers.