Skip to main content
Dublin Library

The Publishing Project

Vestibular Disorders, Reduced Motion Media Query and Video Backgrounds

 

I wasn't aware of Vestibular Disorders being an issue with animations on the web but it's a big part of the disabilities we need to consider when working on the web. It's important to remember that... > People with vestibular disorders have a problem with their inner ear. It affects their balance as well as their visual perception of their world around them. Sometimes the sensation lasts only a short while, but others can suffer it for years. Walking becomes a challenge and they have a constant risk of falling. Concentration is diminished leaving the sufferer unfocused and often unproductive. It is often viewed as a “hidden” disability because it has no outward showing symptoms. So we really want to avoid that kind of problems for our users. Currently we can use the `preferes-reduced-motion` media query to test if the reduced motion settings are enabled (Safari only) and reduce or disable animations from your page. If the browser doesn't understand the query it'll skip the query and its content altogether. ```css @media (prefers-reduced-motion) { .background { animation: none; } } ``` Val Head's [Desgigning Safer Web Animations For Motion Sensitivity](https://alistapart.com/article/designing-safer-web-animation-for-motion-sensitivity) she outlines some examples of sites that cause issues for users who experience Vestibular Disorders, some of the issues that trigger Vestibular Disorders and some solutions to address these problems. Perhaps the most important thing to learn about learning about accessibility and the web is the closing quote on Val's article: > On the web, more than in any other medium, the flexibility and control are there for you to design creatively and responsibly at the same time. We absolutely can innovate and push the web forward designing kick-ass interface animations while still being responsible designers. As a web animator, you can have your animation cake and eat it too—with a little creative thinking. ## The `playsinline` attribute and iOS Moving on we'll look at a (sort of) new attribute for iOS video playback: `playsinline`. Older versions of iOS required you to tap the video before playback would begin. This was done to prevent unnecessary battery usage and to avoid random, and sometimes multiple, video playback on the page if autoplay was enabled for the videos. iOS 7 introduced `webkit-playsinline` as a way to relax the requirement for video playback with a gesture. With iOS 10 Apple has further relaxed the requirements for automatic video playback. The short version of the [new video policies for iOS 10](https://webkit.org/blog/6784/new-video-policies-for-ios/) is as follows: - `