Open okadots opened 1 year ago
I'm experiencing the same bug.
As a workaround, in the same breakpoint where I call destroy
, I'm setting the perPage
value greater than or equal to the number of slides.
E.g.: A slider with 6 slides which is only a slider on tablet breakpoints and below:
document.addEventListener( 'DOMContentLoaded', function(){
new Splide( '.splide', {
mediaQuery: 'min',
perPage: 1,
arrows: false,
breakpoints: {
768: {
perPage: 2
},
992: {
perPage: 6,
destroy: true
}
}
}).mount();
} );
On desktop, Splide now thinks it's showing all the slides at once, so it removes tabindex="-1"
from each slide, even though the actual slider is disabled.
Checks
Version
4.1.4
Description
I am destroying the slide at 768px > browsers. The slider is destroyed successfully, but the
tabindex="-1"
is not removed from the descendent links in all of the elements. In my case, all of the individual elements have links inside. Because of this, a user cannot tab through the items.destroy
also does not remove the IDs that are added to each slide, this however, does not affect the user's ability to tab through elements, so it is not an accessibility issue.Below are my options.
Screenshot of markup showing tabindex and ID.
Reproduction Link
No response
Steps to Reproduce
Expected Behaviour
Expect that the
tabindex="-1"
would be removed as part of thedestroy
function.