kenwheeler / slick

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

Unslick is not fully removing itself. #4083

Open legostud opened 3 years ago

legostud commented 3 years ago

short description of the bug / issue, provide more detail below.

I created a slick slider with three promo components (image and a link). On mobile, the slider is "unslicked" using the responsive: [ {settings: "unslick" }]. Unslick looks like it worked fine, but when I tried to access the links using a keyboard, I noticed that the `tabindex="-1" wasn't removed as part of the unslick command.

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

[ paste your jsfiddle link here ]

use this jsfiddle to reproduce your bug: Your default fiddle has a jQuery error so it doesn't run. http://jsfiddle.net/simeydotme/fmo50w7n/

I created a fiddle anyways with the setup I used. http://jsfiddle.net/qkmb3718/6/

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

Steps to reproduce the problem

  1. Create a list of slides with links in them.
  2. Initialize Slick Slider on that list of slides, using the responsive settings: "unslick" to destroy the slider on mobile
  3. Try using the keyboard to tab to the links of the inactive slides (fails)

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

What is the expected behaviour?

tabindex="-1" should be removed from the links in the slides

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

What is observed behaviour?

tabindex is still there even though the slider has been successfully "unslicked" <a href="#/test-url" tabindex="-1">Launching Accountable Now to Advocate for Police Reform with Data</a>

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

More Details

PS. Thanks for making a very robust and WCAG compliant slider. Now if you could just remove jQuery...

aslamdoctor commented 2 years ago

I am facing same issue.