Skip to content
EUID Audit service & seal, Home
Get your website audited

This translation has not been editorially reviewed yet. The German version is authoritative. Deutsche Fassung

Accessibility

What does a carousel have to do for everyone to serve it?

A carousel, also called a slider or slideshow, shows several contents in succession on the same surface. In order for everyone to operate it, it needs buttons for back and forth, which also reaches the keyboard, a stop button as soon as it runs by itself, and an announcement for read-aloud programs, which image is currently visible. Sweeping should remain the second way. This is what the W3C guide for carousels describes.

Before and back also belong on the mobile phone

The guide advises real button elements because they work by themselves with keyboard and read-out program. On small screens, the buttons must remain available, because some people cannot swipe. As a size he calls at least 44 times 44 CSS pixels, with free space around it. If a button is on a photo, a semi-transparent surface ensures contrast, no matter which image is behind it.

If it runs by itself, it needs a stop

The W3C requires a way to stop for movement that runs longer than five seconds and stands alongside other content. The guide gives a button that stops and starts again. In addition, the carousel stops as long as the mouse is above it or the keyboard focus is in it. So gets his time, who takes longer to read or distracted from movement. The easiest is a carousel that only scrolls on click: Then this button is omitted.

The focus remains where the visitor left it

When pressing "Continue", the keyboard focus should remain on the button, otherwise you can not browse comfortably back and forth. If the picture changes itself, it must not drag anyone away from its place. Read-out programs experience the change via a live area: an invisible text such as "Image 2 of 5", which is announced as soon as it changes. While the carousel runs by itself, this announcement is omitted; Otherwise she would always come in between. Without a stop, a blind visitor suddenly hears an element from the next slide in the middle of reading without realizing it.

The offer in the third picture only sees who leafs so far

The W3C notes that carousels are controversial because their content is hard to discover. For your start page, this means: An action that is only in the third picture only sees who flips so far or waits long enough. Place the most important on the first picture and name each offer additionally in the text of the page or in the menu. The guide recommends a simple list in the code: It can also be displayed on the phone as a list of posts.

Examples

Carousel without controls

Not met
<div class="karussell" data-autoplay="true">
  <img src="1.jpg" alt="…">
  <img src="2.jpg" alt="…">
</div>
Passes
<section aria-labelledby="neuheiten">
  <h2 id="neuheiten">Neuheiten</h2>
  <ul>…</ul>
  <button type="button">Vorheriges Bild</button>
  <button type="button">Nächstes Bild</button>
  <p aria-live="polite" class="nur-vorlesen">Bild 2 von 5</p>
</section>

A named area, a list of content, real buttons and an announcement in the live area. If the carousel runs by itself, a button to stop comes.

  • Go through the finished building block without a mouse: with tab in, stop, leaf on, out again. If the focus lands on a link in a currently hidden image, this is still open.
  • Mark the current number button with color and shape, such as reverse colors and rounder corners. The W3C advises both because these buttons are usually small.

More on this topic

Deutsche Fassung dieser Seite

  • Seal Digitale Barrierefreiheit
  • Seal Daten & Recht
  • Seal Technische Qualität
  • Seal Digital Excellence
  • Seal Cyberversicherung

Audited. For a better digital future.euid.com

What does a carousel have to do for everyone to serve it? · euid.com