Skip to content

Commit

Permalink
Merge pull request #3109 from alexandrubotez/tabindex
Browse files Browse the repository at this point in the history
when focusOnChange is false -> remove attr tabindex
  • Loading branch information
Greg Westneat committed Sep 15, 2017
2 parents 34612b4 + eb67d9e commit dcdc97c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion slick/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,11 @@
}

for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {
_.$slides.eq(i).attr('tabindex', 0);
if (_.options.focusOnChange) {
_.$slides.eq(i).attr({'tabindex': '0'});
} else {
_.$slides.eq(i).removeAttr('tabindex');
}
}

_.activateADA();
Expand Down

0 comments on commit dcdc97c

Please sign in to comment.