Alert
Examples
Bubble
Bubble alerts are designed for displaying inline messages and notifications within forms, panels, cards, and other content areas. They are Chi's default Alert type.
Toast
Toasts are unobtrusive alerts used to display brief, auto-expiring information.
Web Component
Accessibility
Keyboard Navigation
Key | Function |
---|---|
Tab | Moves focus to the next focusable element. If focus is on the alert, moves to the next interactive element. |
Shift + Tab | Moves focus to the previous focusable element. |
Enter ,Space | Activates interactive elements within the alert, such as dismiss buttons or links. |
Esc | Closes the alert if it is dismissible. |
For detailed keyboard interactions, refer to our Keyboard Control Guide.
Visit WebAIM for general keyboard techniques.
Explore live examples in the ARIA Practices Guide.
Resources
- Mozilla Resources for Developers: Best practices for implementing the
role="alert"
. - WebAIM ARIA Guide: Techniques for using ARIA effectively.
Other recommendations
Find additional accessibility tips in our Accessibility Guide.
WCAG 2.2 Guidelines
- Non-text Content: Ensure all badges conveying information have a text alternative. (Level A)
- Info and Relationships: Maintain semantic structure for screen readers. (Level A)
- Headings and Labels: Ensure badges have meaningful labels. (Level AA)
- Labels or Instructions: Provide clear instructions for dismissible badges. (Level A)
- Name, Role, Value: Define ARIA attributes correctly for badges. (Level A)