This criteria applies specifically to device-based actions (such as shaking or tilting a smartphone or tablet) to trigger actions that cannot also be triggered through conventional means. This is an uncommon use case. If you're just using standard HTML elements, you'll resolve this criteria and be compliant by default. No manual intervention will be required, and you can stop reading right here.
The purpose of 2.5.4 is to ensure two things for users with difficulty performing certain motions:
Let's say you're developing a custom application that requires a user to fill out a long form. You have a feature that allows a user to "Undo" their last action by shaking their phone.
The one exemption to this criteria is when motion is considered "essential" to the activity, where if the motion was removed the activity would be invalidated. A pedometer app, for example, needs to use motion in order to accurately track steps.
Either avoid motion-based functions altogether or provide clear, conventional alternatives to navigate your interface.