Carousel
Carousel can display single or multiple slides at a time. The navigation can be configured to be sequential as a group, where slide must be viewed in a specific order, or with a tablist, where users can access slides in any order.
- Avoid using infographics, maps, or charts as images, and do not use images of text.
- Prioritize slides by placing the most critical information first.
- Tablist components offer keyboard navigation, which may not be ideal for mobile devices where space is limited and users prefer gesture-based navigation.
If a slide has a visible label, its accessible label is provided by the visible label, using aria-labelledby.
- Note, that since the
aria-roledescriptionis set to "slide", the label should not also contain the word "slide".
If composing sequential content:
- Ensure each slide within a carousel has
role="group"andaria-roledescription="slide".
If composing non-sequential content:
- Restrict the use of progress dots to five slides or fewer slides.
- Ensure progress dots are not the sole navigation method for users to interact with the carousel.
- Ensure each slide has
role="tabpanel"and `aria-roledescription="slide". - Ensure the tablist is the first element to receive focus, enabling the user to control the carousel, on initial focus.
- Remove the next and prev buttons from the focus order, as the tablist provides sufficient navigation controls.
- If multiple slides are visible at one time, do not include a tablist, as a tablist should only be used with single slides.
When implementing autoplay, consider the following accessibility guidelines:
- include accessible controls to start and stop the autoplay feature, allowing users to manage the animation according to their preferences.
- consider requiring user consent to enable autoplay, especially for users who may find automatic movement disorienting.
- stop the autoplay if the user hovers over the carousel.
- stop the autoplay if the user drags a slide.
- stop the autoplay when content within a carousel slide receives focus, ensuring users can interact with the content without distraction.
- ensure screen readers do not announce changes in slide content during autoplay as the constant interruptions make the page unusable for a screen reader user.
- if autoplay of content starts upon init, the slides should pause upon hover.
- if the user has to press play to see more content, the slides do not need to pause upon hover.
If using with multiple slides per tab, this will create increased complexity for the users relying on assistive technologies.
- consider whether a single slide view is sufficient for your use case, as it simplifies navigation and interaction.
- change the
aria-labelof the next and previous buttons to reflect the multiple slides. For example, "previous group of slides" rather than "previous slide" and "next group of slides" rather than "next slide" .
| Key | Function |
|---|---|
| Tab |
|
| Shift + Tab |
|
| Enter |
|
| Right arrow |
|
| Left arrow |
|
| Home |
|
| End |
|
- Avoid using infographics, maps, or charts as images, and do not use images of text.
- Prioritize slides by placing the most critical information first.
- Tablist components offer keyboard navigation, which may not be ideal for mobile devices where space is limited and users prefer gesture-based navigation.
If a slide has a visible label, its accessible label is provided by the visible label, using aria-labelledby.
- Note, that since the
aria-roledescriptionis set to "slide", the label should not also contain the word "slide".
If composing sequential content:
- Ensure each slide within a carousel has
role="group"andaria-roledescription="slide".
If composing non-sequential content:
- Restrict the use of progress dots to five slides or fewer slides.
- Ensure progress dots are not the sole navigation method for users to interact with the carousel.
- Ensure each slide has
role="tabpanel"and `aria-roledescription="slide". - Ensure the tablist is the first element to receive focus, enabling the user to control the carousel, on initial focus.
- Remove the next and prev buttons from the focus order, as the tablist provides sufficient navigation controls.
- If multiple slides are visible at one time, do not include a tablist, as a tablist should only be used with single slides.
When implementing autoplay, consider the following accessibility guidelines:
- include accessible controls to start and stop the autoplay feature, allowing users to manage the animation according to their preferences.
- consider requiring user consent to enable autoplay, especially for users who may find automatic movement disorienting.
- stop the autoplay if the user hovers over the carousel.
- stop the autoplay if the user drags a slide.
- stop the autoplay when content within a carousel slide receives focus, ensuring users can interact with the content without distraction.
- ensure screen readers do not announce changes in slide content during autoplay as the constant interruptions make the page unusable for a screen reader user.
- if autoplay of content starts upon init, the slides should pause upon hover.
- if the user has to press play to see more content, the slides do not need to pause upon hover.
If using with multiple slides per tab, this will create increased complexity for the users relying on assistive technologies.
- consider whether a single slide view is sufficient for your use case, as it simplifies navigation and interaction.
- change the
aria-labelof the next and previous buttons to reflect the multiple slides. For example, "previous group of slides" rather than "previous slide" and "next group of slides" rather than "next slide" .
| Key | Function |
|---|---|
| Tab |
|
| Shift + Tab |
|
| Enter |
|
| Right arrow |
|
| Left arrow |
|
| Home |
|
| End |
|
- Avoid using infographics, maps, or charts as images, and do not use images of text.
- Prioritize slides by placing the most critical information first.
- Tablist components offer keyboard navigation, which may not be ideal for mobile devices where space is limited and users prefer gesture-based navigation.
If a slide has a visible label, its accessible label is provided by the visible label, using aria-labelledby.
- Note, that since the
aria-roledescriptionis set to "slide", the label should not also contain the word "slide".
If composing sequential content:
- Ensure each slide within a carousel has
role="group"andaria-roledescription="slide".
If composing non-sequential content:
- Restrict the use of progress dots to five slides or fewer slides.
- Ensure progress dots are not the sole navigation method for users to interact with the carousel.
- Ensure each slide has
role="tabpanel"and `aria-roledescription="slide". - Ensure the tablist is the first element to receive focus, enabling the user to control the carousel, on initial focus.
- Remove the next and prev buttons from the focus order, as the tablist provides sufficient navigation controls.
- If multiple slides are visible at one time, do not include a tablist, as a tablist should only be used with single slides.
When implementing autoplay, consider the following accessibility guidelines:
- include accessible controls to start and stop the autoplay feature, allowing users to manage the animation according to their preferences.
- consider requiring user consent to enable autoplay, especially for users who may find automatic movement disorienting.
- stop the autoplay if the user hovers over the carousel.
- stop the autoplay if the user drags a slide.
- stop the autoplay when content within a carousel slide receives focus, ensuring users can interact with the content without distraction.
- ensure screen readers do not announce changes in slide content during autoplay as the constant interruptions make the page unusable for a screen reader user.
- if autoplay of content starts upon init, the slides should pause upon hover.
- if the user has to press play to see more content, the slides do not need to pause upon hover.
If using with multiple slides per tab, this will create increased complexity for the users relying on assistive technologies.
- consider whether a single slide view is sufficient for your use case, as it simplifies navigation and interaction.
- change the
aria-labelof the next and previous buttons to reflect the multiple slides. For example, "previous group of slides" rather than "previous slide" and "next group of slides" rather than "next slide" .
| Key | Function |
|---|---|
| Tab |
|
| Shift + Tab |
|
| Enter |
|
| Right arrow |
|
| Left arrow |
|
| Home |
|
| End |
|