Skip to content
Snippets Groups Projects
Commit f8c20123 authored by Aaron Armstrong's avatar Aaron Armstrong Committed by Rachel Jaro
Browse files

Issue #3488852: Component: Slideshow Accessibility Issues

parent 16872225
No related branches found
No related tags found
No related merge requests found
(function ($, Drupal) {
if ($('.slide-show-with-items-container').length > 0) {
console.log('start slider')
$('.slide-show-with-items-container').each(function() {
console.log('Each slideshow');
const sliderSpeed = $(this).attr('data-slide-speed');
const sliderAutoplay = $(this).attr('data-autoplay');
$(this).on('init reInit beforeChange', function(event, slick){
......@@ -19,6 +17,7 @@
$(slickTrack).attr('aria-label', 'Slideshow');
$(dot).each(function(index) {
$(this).attr('aria-label', 'Slide ' + (index + 1));
$(this).find('button').text('Slide ' + (index + 1) + ' button');
});
slick.$slides.each( function(index) {
$(this).attr('title', 'Slide ' + (index + 1));
......@@ -42,7 +41,6 @@
// Slideshow.
window.addEventListener('load',function(){
console.log('on loaded');
$(".slide-show-with-items-container").each(function(){
let playPauseContainer = document.createElement('ul');
let playBtn = document.createElement('li');
......
(function ($, Drupal) {
if ($('.slide-show-with-items-container').length > 0) {
console.log('start slider')
$('.slide-show-with-items-container').each(function() {
console.log('Each slideshow');
const sliderSpeed = $(this).attr('data-slide-speed');
const sliderAutoplay = $(this).attr('data-autoplay');
$(this).on('init reInit beforeChange', function(event, slick){
......@@ -19,6 +17,7 @@
$(slickTrack).attr('aria-label', 'Slideshow');
$(dot).each(function(index) {
$(this).attr('aria-label', 'Slide ' + (index + 1));
$(this).find('button').text('Slide ' + (index + 1) + ' button');
});
slick.$slides.each( function(index) {
$(this).attr('title', 'Slide ' + (index + 1));
......@@ -42,7 +41,6 @@
// Slideshow.
window.addEventListener('load',function(){
console.log('on loaded');
$(".slide-show-with-items-container").each(function(){
let playPauseContainer = document.createElement('ul');
let playBtn = document.createElement('li');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment