Skip to main content
Motion Icons React is built with accessibility as a core principle. The library automatically handles many accessibility concerns while providing you with tools to create inclusive experiences.

Automatic Motion Reduction

The library automatically respects the user’s motion preferences through the prefers-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:
  1. Open DevTools (F12)
  2. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  3. Type “Rendering” and select “Show Rendering”
  4. Find “Emulate CSS media feature prefers-reduced-motion”
  5. 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 the interactive 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

  1. Keyboard Navigation: Tab through all interactive icons
  2. Screen Reader: Test with NVDA, JAWS, or VoiceOver
  3. Motion Settings: Test with reduced motion enabled
  4. Color Blindness: Use tools like Stark or Colorblinding
  5. Zoom: Test at 200% zoom level

ARIA Attributes Reference

Common ARIA attributes for animated icons:

Resources

Remember: Accessibility is not just about compliance—it’s about creating inclusive experiences that work for everyone.