Skip to main content
Visual Arts & DesignUX Design Patterns29 lines

Accessible Gallery and Carousel Navigation

Build a responsive media gallery or carousel with visible controls, keyboard and touch navigation, stable focus and reduced-motion behavior.

Quick Summary9 lines
Decide whether the task needs a grid, a scrollable gallery or a carousel. For browsing several comparable items, a grid often keeps options visible. Use a carousel where showing one item at a time serves the task. Define whether navigation wraps, whether items have distinct names, and which captions or controls remain visible. Start with manual navigation unless timed rotation is necessary.

## Key Points

- [W3C carousel pattern](https://www.w3.org/WAI/ARIA/apg/patterns/carousel/)
- [W3C modal dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/)
- [W3C WCAG 2.2](https://www.w3.org/TR/WCAG22/?KBOpenTab=undefined)
skilldb get ux-design-patterns-skills/gallery-carouselFull skill: 29 lines
Paste into your CLAUDE.md or agent config

Accessible Gallery and Carousel Navigation

Decide whether the task needs a grid, a scrollable gallery or a carousel. For browsing several comparable items, a grid often keeps options visible. Use a carousel where showing one item at a time serves the task. Define whether navigation wraps, whether items have distinct names, and which captions or controls remain visible. Start with manual navigation unless timed rotation is necessary.

Make media and focus predictable

Give the gallery a meaningful accessible name and use native previous and next buttons with useful labels. Keep focus on the activating control when moving between slides unless the user explicitly asks to enter a slide or opens a separate lightbox. Hidden slides should not expose their interactive descendants in the tab order. If slide selectors are tabs, implement the corresponding keyboard and selection behavior. A flat series of native buttons can be easier to maintain for a small number of items.

Provide keyboard and touch access to the same destinations. Swipes can complement visible controls. Avoid swallowing vertical page scrolling or pinching. Show current position in an accessible way and avoid re-announcing the full gallery on every change. If timed rotation exists, put a clearly labeled stop/start control before the rotating content in the tab order. Stop rotation while the pointer hovers and when keyboard focus enters. Restart only when the user activates the rotation control after a focus stop. Respect reduced motion and do not force focus to follow automatic changes.

Reserve media dimensions to keep controls stable while images load. Supply responsive sources and meaningful alternatives for informative media. Handle a failed image with useful text. When a separate lightbox opens, establish and restore focus using the modal's normal behavior. If the original item disappears, return focus to a documented fallback.

Verify with a realistic gallery

Exercise one item, several items, first/last boundaries, slow-loading media and a missing image. Advance with keyboard, touch and controls, then check the active item, focus, announcements and page scroll. Test narrow and wide layouts, reduced motion and a lightbox return. Inspect what assistive technology can reach when slides are hidden. Record the tested browser and input configuration rather than inferring broad support from a mouse pass.

References and rights

Original SkillDB instructions under LicenseRef-SkillDB-Content. References were checked 2026-11-13 and used for technical verification.

Install this skill directly: skilldb add ux-design-patterns-skills

Get CLI access →