kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.5k stars 5.88k forks source link

A combination of two options disables accessibility support #4011

Open anevins12 opened 4 years ago

anevins12 commented 4 years ago

When providing Slick two specific options we lose keyboard support.

====================================================================

http://jsfiddle.net/fpzahn04/3/

====================================================================

Steps to reproduce the problem

  1. Create slides that have a focusable element, such as a link
  2. Initialise Slick with the following options: 'centerMode': true, 'infinite': false
  3. Test if you can focus on interactive elements in the visible slide

====================================================================

What is the expected behaviour?

Links and interactive elements inside visible slides should be focusable using the 'tab' key.

====================================================================

What is observed behaviour?

Links and interactive elements inside visible slides were not focusable using the 'tab' key, because those links still have negative tabindex that was not removed. The negative tabindex removal is never ran because the slide does not have an slick-active class. The conditions that add this class are never met with these two options.

====================================================================

More Details

ma31cm commented 8 months ago

Just found the same bug!