Skip to main content

Accessibility

Prop NameTypeDefault Value
keyboardbooleantrue
titlestringundefined

Keyboard

By default the carousel can be navigated using the keyboard. The keyboard prop can be used to disable the keyboard navigation.

Code

<Carousel showDots showArrows keyboard={false}>
<img src="pexels-01.jpg" />
<img src="pexels-02.jpg" />
<img src="pexels-03.jpg" />
</Carousel>

Title

The carousel has a title prop that can be used to provide a title for the carousel. The value of the title will be rendered as a hidden h3 tag for the carousel targeted with the aria-labeledby attribute. This will help screen readers to announce the title of the carousel when it is focused.

Code

<Carousel showDots showArrows title="Carousel">
<img src="pexels-01.jpg" />
<img src="pexels-02.jpg" />
<img src="pexels-03.jpg" />
</Carousel>