react-slick
react-slick copied to clipboard
Accesibility
Running AXE validation returns one a11y error introduced by react-slick:
ARIA hidden element must not contain focusable elements
Basically stop adding aria-hidden to each slide, tabindex=-1 will be the way for non visible slides.
tabindex=-1
is not enough. The slides are still visible for assistive technologies, and focusable elements (such as links) inside the slide are still navigateable by tab key or other means.
What, in my opinion, should be done instead is to set visibility: hidden
on slides the moment they are settled outside of the visible area. The somewhat tricky part is that they should be made visible again as soon as sliding begins.
Why not use the Inert attribute? You can use the polyfill from wicg github
Has anyone found a good work around for this?
Having links inside slides creates accessibility check failures.