Accessibility
Accessibility is on by default; there is no module to add.
What the slider does for you
- Roles: the viewport is a
regionwitharia-roledescription="carousel"and yourlabel(or the element'saria-label); every slide is agroupwitharia-roledescription="slide"and "Slide 3 of 8". - Only visible slides are reachable: off-screen slides get
inertandaria-hidden, so keyboard and screen reader users never land in a hidden slide. - Announcements: a polite live region announces the slide when the user changes it. While autoplay runs, announcements are off so the reader is not interrupted every few seconds.
- Keyboard: arrows, PageUp/PageDown, Home/End on the focused slider; focusing a link in a partly hidden slide brings that slide into view.
- Autoplay control: a visible pause / play button (WCAG 2.2.2), pause on hover and focus, pause off screen.
- Reduced motion: 3D and WebGL become fades, layers appear without motion, autoplay and Ken Burns are off.
- Split text: headings split into letters keep an
aria-labelwith the whole sentence. - Real images: backgrounds keep their
alt. The console warns about background images without analtattribute (usealt=""for decorative ones).
Labels in your language
English and Turkish are built in and picked from the page lang (locale: "auto"). Any label can be replaced:
js
new InsigneSlider(el, {
label: 'Featured stories',
i18n: { prev: 'Vorherige Folie', next: 'Nächste Folie', slide: 'Folie {i} von {n}', goTo: 'Gehe zu Folie {i}' },
});Your part
- Give the slider a name:
aria-label="Featured stories". - Write
alttext for meaningful backgrounds. - Keep text over images readable — a gradient shade behind the copy is usually enough.
- Avoid autoplay for content people must read.