Spinner
Examples
Backdrop
Contextual
Colors
By default, spinners are rendered in the same color as the text color defined on their parent container. Easily change a spinners color using the examples below.
Web Component
Accessibility
Keyboard Navigation
Key | Function |
---|---|
Tab | Moves focus to the next element in the tab sequence. The spinner itself should not receive focus. |
Shift + Tab | Moves focus to the previous focusable element. The spinner should not disrupt navigation. |
Esc | If the spinner is inside a modal or dialog, pressing Esc should close the container if applicable. |
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
- WCAG 2.2 Animation Guidelines: Recommendations for reducing animation effects for users with vestibular disorders.
- MDN Guide on ARIA Live Regions: Explains how to communicate dynamic changes to assistive technologies.
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)