WebAIM: Animation and Carousels Animation and Carousels You are here: Articles > Animation and Carousels Introduction Animated elements excel at capturing and directing user attention. They also excel at distracting and frustrating users when used incorrectly. Nobody likes trying to read an article or fill out a form while half a dozen animated ads, blinking popups, or scrolling news tickers get in the way. For people with cognitive and learning disabilities, animation can make task completion difficult or even impossible. Animation Animated content includes anything that moves, blinks, scrolls, or updates on its own, such as animated carousels, "toast" popups, jiggling icons, or spontaneous dialog boxes. These distractions impact usability for all users, but are especially obstructive to people with cognitive and learning disabilities. For a person with ADHD (which includes over 8% of adolescents and over 4% of adults ), even a small animated element can make it very difficult to focus or complete tasks. Animated elements can also present significant difficulty for users who need extra time to read the content, such as users with cognitive disabilities or low vision Users must have a keyboard- and mouse-accessible way to pause, stop, or hide automatically moving, blinking, or scrolling content (such as carousels, marquees, or animations) that lasts longer than five seconds and is presented in parallel with other content. This also includes automatically updating content like news tickers, chat messages, and so on. The easiest and most accessible way to accomplish this is with a simple
/* Remove animation. */ @media (prefers-reduced-motion: reduce) { .animation { transition: none; Carousels Many animated elements take the form of auto-rotating carousels, which constantly rotate through slides. Carousels, also known as "sliders", became popular around 2005 due to their visual appeal and space efficiency. Unfortunately, carousels don't work well. In fact, most users ignore or avoid carousels, leading to a lot of missed content on the web. Not all carousels animate automatically. Manually controlled carousels require user input to transition between slides, typically by activating "Previous Slide" and "Next Slide" carousel control buttons. This allows users to access the content at their own pace. Because they aren't animated, manually controlled carousels are simpler and more accessible than their auto-rotating counterparts. However, both types of carousels are complex and can introduce significant accessibility barriers. We discourage the use of carousels. If carousels are implemented, there are several accessibility considerations in order for them to meet WCAG standards. Accessibility Requirements Both auto-rotating and manually controlled carousels must ensure that users… can access all functions using only the keyboard, including providing a prominent keyboard focus indicator are provided with images and controls that have alternative text, or another form of accessible name encounter images and controls that provide sufficient contrast and that do not use color alone to convey meaning hear content upon manual transition when using a screen reader will not encounter problems when the carousel updates An example of an accessible carousel is the WAI-ARIA Carousel Example Potential Problems Animated elements and carousels can be implemented incorrectly and create accessibility issues. Below are some common issues and how to address them. For brevity, pause/play buttons, next and previous slide buttons, and other carousel control buttons are collectively referred to as "controls". Controls are not buttons Pause/play buttons, next and previous slide buttons, and other controls for animation and carousels should be coded as standard