Raxol.Animation.Accessibility (Raxol v2.0.1)
View SourceHandles accessibility concerns for the Animation Framework, specifically adapting animations for reduced motion preferences.
Summary
Functions
Adapts an animation definition based on reduced motion and cognitive accessibility settings.
Adapts an animation definition for cognitive accessibility by increasing its duration.
Adapts an animation definition based on reduced motion settings.
Checks if an animation has been adapted for cognitive accessibility.
Checks if an animation is disabled (either by reduced motion or other means).
Checks if an animation has been adapted for reduced motion.
Functions
Adapts an animation definition based on reduced motion and cognitive accessibility settings.
Priority order:
- Reduced motion takes precedence - if enabled, animations are disabled regardless of cognitive accessibility
- Cognitive accessibility - only applies if reduced motion is not enabled
- No adaptation - returns animation unchanged
Parameters
animation- The animation definition to adaptreduced_motion- Whether reduced motion is enabledcognitive_accessibility- Whether cognitive accessibility is enabled
Returns
The adapted animation definition
Adapts an animation definition for cognitive accessibility by increasing its duration.
This makes animations slower and potentially easier to follow. Only applies if reduced motion is not enabled.
Adapts an animation definition based on reduced motion settings.
When reduced motion is enabled, animations are effectively disabled by setting a very short duration and marking them as disabled. This provides near-instant transitions while maintaining the animation structure for proper completion handling.
Checks if an animation has been adapted for cognitive accessibility.
Checks if an animation is disabled (either by reduced motion or other means).
Checks if an animation has been adapted for reduced motion.