Badge
Examples
Chi includes three badge variants: Solid, Outline, and Flat. Use solid
badges for high emphasis,base or outline
badges for medium emphasis, and flat
badges for low emphasis.
Web Component
Accessibility
Keyboard Navigation
Key | Function |
---|---|
Tab | Skips over the badge (non-focusable element). |
Shift + Tab | Skips over the badge (non-focusable element). |
Enter ,Space | N/A (No interactive behavior). |
Esc | N/A (No dismissible action). |
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 ARIA Role Guide: Learn about
status
roles for dynamically updating badge content. - WCAG Guidelines: Reference WCAG 2.2 accessibility principles for ensuring badges are perceivable and usable by all users.
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)