Purpose of These DocsThese docs are meant as a starting point for using Anvil2 accessibly. While the contents can contribute to building accessible interfaces from scratch, that is not the main goal.
Overview
Directly Related WCAG Guidelines(s):- 1.1.1 Non-text Content (Level A)
- 1.2.1 Audio-only and Video-only (Prerecorded) (Level A)
- 1.2.2 Captions (Prerecorded) (Level A)
- 1.2.3 Audio Description or Media Alternative (Prerecorded) (Level A)
- 1.4.2 Audio Control (Level A)
- 2.2.2 Pause, Stop, Hide (Level A)
- 2.3.1 Three Flashes or Below Threshold (Level A)
- 2.3.3 Animation from Interactions (Level AAA)
| Anvil2 Responsibility | Implementor Responsibility |
|---|---|
| Anvil2 provides the technical infrastructure to help aid in compliance with focus management, reduced motion support and icon support but video and audio media is not currently covered as we don’t have any components that power these at the moment. | Implementors ensure proper control of content-specific timing controls and motion management are in place and announced to the user as well as provide alternative forms for content where needed. |
Alt Tags vs Decorative Images
Directly Related WCAG Guidelines(s):- 1.1.1 Non-text Content (Level A)
- 1.4.1 Use of Color (Level A)
- 1.4.3 Contrast (Minimum) (Level AA)
- 1.4.5 Images of Text (Level AA)
| Anvil2 Responsibility | Implementor Responsibility |
|---|---|
| Anvil2 provides the proper attributes for icon usage within the components or by using the Icon component as well as the basic infrastructure to properly use images. | Implementors ensure that alt tags are populated with meaningful descriptions and that the correct properties are applied to decorative images. |
Best Practices
- Write concise, relevant alt text for informative images using as few words as possible to convey meaning
- Use empty alt attributes (
alt="") for purely decorative images so screen readers skip them - Describe the purpose or content of an image, not its appearance
Common Pitfalls
- Writing vague or overly elaborate alt descriptions that overwhelm users
- Adding alt text to decorative images that should be ignored by assistive technologies
- Describing visual details instead of conveying the image’s purpose or message
Timing and Motion Adjustments
Directly Related WCAG Guidelines(s):- 2.2.1 Timing Adjustable (Level A)
- 2.2.2 Pause, Stop, Hide (Level A)
- 2.3.1 Three Flashes or Below Threshold (Level A)
- 2.3.3 Animation from Interactions (Level AAA)
| Anvil2 Responsibility | Implementor Responsibility |
|---|---|
| Anvil2 provides basic motion preference support and animation infrastructure that respects user preferences. | Implementors ensure proper control of content-specific timing controls and motion management are in place and announced to the user. |
Best Practices
- Respect user motion preferences set at the system level (
prefers-reduced-motion) - Provide controls to pause, extend, or disable time limits on content
- Give clear feedback about timing constraints with options to adjust them
Common Pitfalls
- Ignoring user preferences by forcing animations or auto-advancing content
- Failing to inform users about timing constraints before they expire
- Automatically hiding components that contain interactive elements or important information
Video/Audio and Interactive Controls
Directly Related WCAG Guidelines(s):- 1.2.1 Audio-only and Video-only (Prerecorded) (Level A)
- 1.2.2 Captions (Prerecorded) (Level A)
- 1.2.3 Audio Description or Media Alternative (Prerecorded) (Level A)
- 1.2.4 Captions (Live) (Level AA)
- 1.2.5 Audio Description (Preredcorded) (Level AA)
- 1.4.2 Audio Control (Prerecorded) (Level A)
- 2.1.1 Keyboard (Level A)
- 2.1.2 No Keyboard Trap (Level A)
- 4.1.2 Name, Role, Value (Level A)
| Anvil2 Responsibility | Implementor Responsibility |
|---|---|
| Anvil2 does not currently incorporate any video or audio tools into our design system. | Implementors ensure they are selecting or building properly accessible media solutions. |
Best Practices
- Provide accessible media controls with proper keyboard navigation
- Include captions for videos and transcripts for audio content
- Avoid autoplay, but if required, always provide visible pause/stop controls
Common Pitfalls
- Omitting alternative formats like captions or transcripts
- Missing essential media controls (play, pause, volume, etc.)
- Autoplaying media without providing accessible controls to stop it