Skip to content

Commit

Permalink
- Evenly distribute aria-describedby tags through available dots.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Barsi committed May 27, 2016
1 parent b6569fd commit a0212e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion slick/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -1288,8 +1288,11 @@
_.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
$(this).attr('role', 'option');

//Evenly distribute aria-describedby tags through available dots.
var describedBySlideId = _.options.centerMode ? i : Math.floor(i / _.options.slidesToShow);

if (_.options.dots === true) {
$(this).attr('aria-describedby', 'slick-slide' + _.instanceUid + i + '');
$(this).attr('aria-describedby', 'slick-slide' + _.instanceUid + describedBySlideId + '');
}
});

Expand Down

0 comments on commit a0212e8

Please sign in to comment.