Automatic Motion Reduction
The library automatically respects the user’s motion preferences through theprefers-reduced-motion CSS media query.
How It Works
When a user has enabled “Reduce motion” in their system settings:- All animations are automatically disabled
- Icons still render normally but without motion effects
- No additional code is required from you
Testing Motion Preferences
You can test this behavior in your browser:- Chrome/Edge
- Firefox
- System Settings
- Open DevTools (F12)
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type “Rendering” and select “Show Rendering”
- Find “Emulate CSS media feature prefers-reduced-motion”
- Select “reduce”
Screen Reader Support
Motion Icons React maintains proper accessibility for screen readers.Semantic HTML
Icons are rendered with appropriate ARIA attributes:Custom Labels
Provide meaningful labels for screen readers:Decorative Icons
Mark purely decorative icons to hide them from screen readers:Focus Management
Interactive icons maintain proper focus behavior.Keyboard Navigation
When using theinteractive prop, icons become keyboard accessible:
Focus Indicators
Ensure interactive icons have visible focus indicators:Color and Contrast
Ensure your animated icons meet accessibility standards.Contrast Requirements
Follow WCAG guidelines for color contrast:Color-Blind Friendly
Don’t rely solely on color to convey information:Best Practices
Animation Duration
Keep animations short and purposeful:Animation Frequency
Limit the number of simultaneously animating elements:Meaningful Animations
Use animations that enhance understanding:Testing Accessibility
Automated Testing
Use tools to test accessibility:Manual Testing
- Keyboard Navigation: Tab through all interactive icons
- Screen Reader: Test with NVDA, JAWS, or VoiceOver
- Motion Settings: Test with reduced motion enabled
- Color Blindness: Use tools like Stark or Colorblinding
- Zoom: Test at 200% zoom level
ARIA Attributes Reference
Common ARIA attributes for animated icons:Resources
- Web Content Accessibility Guidelines (WCAG)
- MDN Accessibility Guide
- A11y Project Checklist
- WebAIM Screen Reader Testing
Remember: Accessibility is not just about compliance—it’s about creating inclusive experiences that work for everyone.