Splide attempts to enhance accessibility by supporting keyboard control and adding ARIA attributes.
Keyboard shortcuts are enabled as default by listening to the
keydown event of the
document. Here is the list of shortcuts:
|Arrow Left||Go to previous page in LTR mode or next page in RTL mode|
|Arrow Right||Go to next page in LTR mode or previous page in RTL mode|
|Arrow Up||Go to previous page in TTB mode.|
|Arrow Down||Go to next page in TTB mode.|
If there are multiple sliders in a page, all sliders correspond with shortcuts simultaneously because the handler is attached to the
document. If you want to control them individually, set the
keyboard option to
'focused', which makes sliders focusable by adding
tabindex="0" to their root element.
Arrows, visible slides and pagination items can be navigated by Tab key. Try it in the following slider.
This is achieved by adding
tabindex="0" to visible slides. This can be disabled by setting the
You need to style a focused element by yourself with border, background-color or outline etc, so that it adapts to your design.
ARIA attributes are added to following elements if
accessibility option is enabled. Note that all texts can be modified through an