Description
Summary
The Carousel pattern explains why off-screen slides and automatic rotation cause problems for assistive technology users, but the WAI-ARIA Roles, States, and Properties section does not say how to handle either one. I propose two additions.
1. Off-screen and partially visible slides
The "About This Pattern" section notes that the screen reader experience can be confusing and disorienting when slides that are not visible are incorrectly hidden, for example by being positioned off-screen. However, no bullet under "Basic carousel elements" says how slides that are not displayed should be hidden.
This matters more for carousels that show several slides at once, or that show part of the next slide as a visual cue. In these designs, display: none is often not an option, so authors move slides off-screen or clip them. The result is content that screen reader and keyboard users can still reach but cannot see.
The inert attribute handles both problems in one step. It removes content from the accessibility tree and from the Tab sequence, and it is supported in all major browsers.
Proposed addition (after the bullet on slide container roles):
Each slide container that is not currently displayed, including any slide that is only partially visible, has the
inertattribute. This removes the slide's content from both the accessibility tree and the pageTabsequence. Note: if slides that are not displayed remain reachable, screen reader and keyboard users can move into content they cannot see, which makes the carousel cumbersome and disorienting to navigate.
2. Respecting reduced-motion preferences
The list of features for carousels that can rotate automatically covers rotation controls and stopping on focus or hover. It does not cover users who have already asked their operating system to reduce motion. Starting auto-rotation for these users ignores a preference they set on purpose, and automatic motion is the kind of effect that preference is meant to prevent.
Proposed addition (to the "If the carousel can automatically rotate, it also:" list):
Does not start rotating automatically when the user has indicated a preference for reduced motion, e.g., via the
prefers-reduced-motionmedia feature.
Related
- Media Queries Level 5: prefers-reduced-motion
- WCAG Technique C39: Using the CSS prefers-reduced-motion query to prevent motion
- Understanding SC 2.2.2: Pause, Stop, Hide
Examples
The two carousel examples probably need matching updates, especially for the reduced-motion check. I am happy to do that in a follow-up PR once the pattern wording is settled.
Activity
Carousel pattern: Add inert guidance for undisplayed slides and reduc…
mcking65 commentedon Nov 11, 2026
@patrickfox
Note that the APG pattern pages do not include coding techniques, such as using inert for hidden carousel slides. In some special cases, a coding technique might be mentioned in a note in the roles, states, and properties section of the pattern if it is essential to the pattern. Modal dialog pattern is a good example of that.
With the exception of specifying ARIA roles, states, and props, The pattern is focused on the UX. With that in mind, your suggestion to include support for reduced motion settings addresses an important oversight. That is an important UX feature that should be included in the about section of the pattern.
The current examples do support the CSS media feature for prefers reduced motion.
Perhaps one of the examples could use
inertinstead ofdisplay:noneto illustrate an alternative approach. It seems like an approach that could have some distinct advantages.It would be helpful if you would like to submit a PR to add reduced motion support to the pattern.
In addition, if you have ideas about using inert in one of the examples, please share those as well.
Carousel pattern: Respect the user's prefers-reduced-motion preference
Carousel pattern: Hide off-screen slides from assistive technologies
patrickfox commentedon Nov 13, 2026
Thank you @mcking65.
For clarity, I have split this into two separate PRs, both of which are minor content updates:
For #3486 (hiding off-screen slides), I have removed the reference to the
inertattribute so the bullet describes the expected outcome without a specific technique. It now reads:For #BBBB (reduced motion), I have added a bullet to the "If the carousel can automatically rotate, it also:" list in the About This Pattern section:
Regarding the current carousel examples, using
inertvs.display: none;is effectively the same thing: the off-screen slides are not visible and are properly hidden from AT. I often see far more complex examples of carousels out in the wild, though, where there may be twenty slides in a carousel and only five of them are visible. And I frequently see that are not hidden from AT, which creates a more cumbersome experience. I think there's an opportunity here to provide additional carousel examples that are a bit more complex (and realistic), but I will follow up with another proposal for those.