OGE logoOGE

Alert

oge-alert is an inline message in the page flow — an information note, a success, a warning or an error — with an optional title, an actions row and a dismiss button.

The role follows the severity: errors and warnings are role="alert" (assertive), information and success role="status" (polite). Both only announce content that changes, so the role stays on the host while the alert is hidden — showing it again is what screen readers announce. The glyph is decoration: a visually hidden prefix carries the severity, so it never rides on colour alone.

role=alert / status dismissible actions RTL

Severities

Four severities, four glyphs, four live-region roles: info / success are role="status", warning / error role="alert".

info success warning error
Information A new version is available.
Success Your changes were saved.
Warning Your trial ends in three days.
Error The payment could not be processed.

Styling modes

soft (default) is a tinted surface with a severity rail, outlined a coloured frame, filled the solid severity colour with --oge-severity-contrast text.

soft outlined filled
Success Soft
Success Outlined
Success Filled

Title, actions & dismiss

dismissible adds a real dismiss button named from the messages catalog. closing is cancelable; when the alert held focus, focus moves to the next control instead of dropping to the page body.

title [ogeAlertActions] dismissible closing
Warning Storage almost full
You have used 92% of your quota.

Live regions

The role stays on the host while it is hidden, so showing the alert inserts its text into an existing live region and is announced. live="off" renders no role for a permanent note; assertive / polite force one.

live announce on show live: off
Information This page is read-only.

Custom icon

[ogeAlertIcon] replaces the default glyph inside an aria-hidden wrapper; [showIcon]="false" drops the icon column.

[ogeAlertIcon] showIcon
Information Tip
Press ? to see every keyboard shortcut.
Information No icon at all.