How to build an accessible Carousel in React

The container is a labelled region with aria-roledescription="carousel"; each slide is a labelled group ("n of total"); prev/next are real buttons and the dot indicators use roving tabindex with arrow-key navigation. Scrolling honours prefers-reduced-motion.

When to use a Carousel

When not to use it

Keyboard interactions

Role group, verified at WCAG 2.2-AA.

Common mistakes

Avoid: Auto-rotating carousel for primary navigation or key calls-to-action

Prefer: A static list or grid where every item is visible

Auto-rotation and hidden slides reduce discoverability and accessibility of important content

Example

<Carousel>
  <img src="/1.jpg" alt="" />
  <img src="/2.jpg" alt="" />
</Carousel>

See the full Carousel reference →