Skip to content

Carousel pattern: Hide off-screen slides from assistive technologies - #3486

Open
patrickfox wants to merge 1 commit into
w3c:mainfrom
patrickfox:carousel-hidden-slides
Open

patrickfox wants to merge 1 commit into
w3c:mainfrom
patrickfox:carousel-hidden-slides

Conversation

@patrickfox

Copy link
Copy Markdown

Part of #3476

This change adds one bullet to "Basic carousel elements," after the bullet on slide container roles:

Each slide container that is not currently displayed, including any slide that is only partially visible, is hidden from assistive technologies and its content is not included in the page Tab sequence. 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.

Why this change

"About This Pattern" already names this problem: 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, the WAI-ARIA Roles, States, and Properties section never states the expected outcome, so an author following the pattern's requirements has no bullet that tells them how slides that are not displayed should behave.

The gap matters most in common designs that show several slides at once or show part of the next slide as a visual cue. Authors often position, clip, or scroll these slides out of view rather than hide them, which leaves their content in the accessibility tree and the Tab sequence. Screen reader users then read content from slides they cannot see, out of step with what is displayed, and keyboard users move focus to links and buttons that are off-screen, where they cannot see where focus is.

Notes for reviewers

  • Per feedback on the earlier combined proposal, this version describes the expected outcome and does not recommend a specific technique, leaving authors free to choose how they hide slides.
  • Partially visible slides are included because their content is cut off and is not meaningfully displayed. The wording addresses assistive technologies and the Tab sequence only, so it does not prevent a partially visible slide from responding to a mouse click.
  • No changes to the examples in this PR.

Part of w3c#3476

This change adds one bullet to "Basic carousel elements," after the bullet on slide container roles:

> Each slide container that is not currently displayed, including any slide that is only partially visible, is hidden from assistive technologies and its content is not included in the page `Tab` sequence. 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.

Why this change

"About This Pattern" already names this problem: 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, the WAI-ARIA Roles, States, and Properties section never states the expected outcome, so an author following the pattern's requirements has no bullet that tells them how slides that are not displayed should behave.

The gap matters most in common designs that show several slides at once or show part of the next slide as a visual cue. Authors often position, clip, or scroll these slides out of view rather than hide them, which leaves their content in the accessibility tree and the `Tab` sequence. Screen reader users then read content from slides they cannot see, out of step with what is displayed, and keyboard users move focus to links and buttons that are off-screen, where they cannot see where focus is.

Notes for reviewers

- Per feedback on the earlier combined proposal, this version describes the expected outcome and does not recommend a specific technique, leaving authors free to choose how they hide slides.
- Partially visible slides are included because their content is cut off and is not meaningfully displayed. The wording addresses assistive technologies and the `Tab` sequence only, so it does not prevent a partially visible slide from responding to a mouse click.
- No changes to the examples in this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant