Success Criterion 2.2.2 - Level A
Pause, Stop, Hide
Ensure it is possible to pause, stop or hide moving parts on the screen. Users of assistive technologies may find it difficult to use animated elements. After pausing or stopping animations, interaction is often possible. Flashing content makes it more difficult for people with attention disorders to stay focused. Hiding the distracting content makes it easier for them to use an app.
Impact
The screen reader reads all content. If the content jumps automatically before the screen reader has read everything aloud, the user is missing information.
The blinking of elements creates a distraction for people with a cognitive impairment or attention deficit, which makes it difficult to use an app.
Check
“Can moving parts be stopped?“
This can be tested without assistive technologies.
Solution
Disable animations
On Android, you should provide buttons to pause, stop or hide content. You could use the ANIMATOR_DURATION_SCALE
and/or TRANSITION_ANIMATION_SCALE
preferences to check if animations should be disabled. If either value is zero
, you could choose to disable (non-essential) animations in your app.
val duration = Settings.Global.getFloat(
context.getContentResolver(),
Settings.Global.ANIMATOR_DURATION_SCALE,
1f
)
val transition = Settings.Global.getFloat(
context.getContentResolver(),
Settings.Global.TRANSITION_ANIMATION_SCALE,
1f
)
if (duration == 0f || transition == 0f) {
// Disable animations
}