Skip to content

Commit

Permalink
Merge pull request #477 from devgeniem/TMS-936
Browse files Browse the repository at this point in the history
TMS-936: Image carousel accessibility fixes
  • Loading branch information
eebbi authored Oct 11, 2023
2 parents 0d7edc3 + f8317d2 commit 2b33410
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 189 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- TMS-936: Image carousel accessibility fixes
- TMS-933: Modaal accessibility fixes

## [1.50.0] - 2023-10-04
Expand Down
4 changes: 3 additions & 1 deletion assets/scripts/image-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default class ImageCarousel {
asNavFor: '#' + modalCarousel.attr( 'data-slider-for' ),
prevArrow: buttons.prevArrow,
nextArrow: buttons.nextArrow,
regionLabel: translations.modal_carousel,
regionLabel: translations.browsing_images,
arrowsPlacement: 'afterSlides',
} );

Expand Down Expand Up @@ -125,7 +125,9 @@ export default class ImageCarousel {
// Make the centered image selectable, rest disabled.
// This way user can't open the "wrong" image and get confused of the results.
$( slick.$slider ).find( '.slick-slide button' ).removeAttr( 'disabled' );
$( slick.$slider ).find( '.slick-slide button' ).removeAttr( 'aria-hidden' );
$( slick.$slider ).find( '.slick-slide:not(.slick-current) button' ).attr( 'disabled', '' );
$( slick.$slider ).find( '.slick-slide:not(.slick-current) button' ).attr( 'aria-hidden', 'true' );

// Transalate Slick Slider stuff
this.translateCarousels( translations );
Expand Down
Binary file modified lang/fi.mo
Binary file not shown.
Loading

0 comments on commit 2b33410

Please sign in to comment.