Announcer 1.2.2
The <velin-announcer> component exposes an ARIA live region for polite screen-reader updates after async actions. Added in 0.7.5. Deutsch: Announcer De
Maturity: Documented as stable in VelinStyle 1.2.0. Design Intelligence (plan / review / agent meta) is separate and beta / foundation where noted.
When to use
- Announce short status messages to assistive technology via
<velin-announcer>. - When another component (or your app code) needs a polite/assertive live region without building one ad hoc.
When not
- Visible persistent banners — use Alerts or Toasts.
- Form error summaries after submit — use Form summary.
Example
<velin-announcer></velin-announcer>
<script>
VelinAnnouncer.announceGlobal('Saved');
</script>
JavaScript API
| API | Description |
|---|---|
VelinAnnouncer.announceGlobal(message) | Announce via the first velin-announcer on the page |
element.announce(message) | Announce on a specific instance |
Import
Load the bundle once, then use the custom element in your markup:
<script type="module" src="../../dist/velinstyle-components.min.js"></script>
<velin-announcer>…</velin-announcer>
Accessibility
- Prefer concise messages; avoid flooding the live region with rapid updates.
- Use the announcer for status changes that are not already exposed by focused UI (see examples on this page).