BetaPublic beta — Read the release notes
Documentation

Alert

Keyboard, focus, semantic, and consumer responsibilities for Alert.

Package
@solidiom/alert
Version
0.0.1-next.0
Status
stable

Accessibility

Accessibility contract

Semantics

  • Renders Root as a `<div>` with `role="alert"` (assertive) or `role="status"` (polite).
  • Title renders as an `<h5>` and is wired to `aria-labelledby` on the Root.
  • Description renders as a `<div>` and is wired to `aria-describedby` on the Root.
  • IDs are generated with `createStableId` for SSR-safe consistency.
  • Carries `data-scope="alert"`, `data-part`, and `data-state` attributes on all parts.

ARIA

  • `role="alert"` indicates an assertive live region that interrupts the user to announce the message immediately.
  • `role="status"` indicates a polite live region that announces the message at the next opportunity without interruption.
  • `aria-labelledby` on Root references the Title's stable ID to provide a name for the alert.
  • `aria-describedby` on Root references the Description's stable ID to provide a description for the alert.

Consumer responsibilities

  • Always include a Title so screen readers can announce a meaningful alert name.
  • Use `assertiveness="polite"` for non-urgent updates like status changes or notifications.
  • Use `assertiveness="assertive"` (default) for critical information that requires immediate attention.
  • Do not programmatically remove and re-create the alert to trigger re-announcements; use a polite role or manage `aria-live` changes instead.

Not applicable

keyboard
Alert is a non-interactive display element with no keyboard interactions.
focus
Alert is a non-interactive display element and does not receive focus. It announces content to assistive technologies without stealing focus.

Review status: Draft — not yet reviewed

This contract describes what the primitive guarantees. Consuming products remain responsible for labels, layout, and workflow decisions that affect the final accessibility result.

Automated evidence

Axe scan summary

Passes
9
Violations
0
Incomplete
1

Latest executed scan: Aug 13, 2026, 10:47 PM

Evidence IDs: axe-alert-scan-v1

Automated checks cover only the recorded fixture and do not establish complete accessibility conformance.