Skip to main content
Logo Appt Light

Success Criterion 2.5.4 - Level A

Motion Actuation

Provide an alternative for motion-triggered actions and make it possible to disable them. For users with limited hand function, shaking is often not possible. Provide an alternative, such as a button. For users with spasms, the actions can be triggered inadvertently. Make it possible to disable motion-triggered actions.

Impact

  • For users with (temporarily) limited hand function, shaking is often not possible. Make sure that these functions can also be activated in another way.

  • Movement in a wheelchair or spasms can unintentionally activate functions. Make sure that these functions can be turned off.

Check

“Is an alternative option available for motion-triggered functions?“

This can be tested without assistive technologies.

Solution

Add alternatives for motion activated actions

On Android, the SensorManager can be used in combination with SensorEventListener to detect movement.

An event through sensors should not be the only way to trigger actions. Make sure to provide a second way, such as a button, to trigger the same action.

class SensorActivity : AppCompatActivity(), SensorEventListener {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        
        val sensorManager = getSystemService(Context.SENSOR_SERVICE) as SensorManager
        val sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
        sensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_NORMAL)
    }

    override fun onSensorChanged(event: SensorEvent?) {
        // Add alternative
    }
}

Resources

Feedback?

Let us know!