diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 51d179b..1b50ff3 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- TMS-1048: Fix screen reader texts to show on exhibition-carousel + ## [1.3.5] - 2024-05-20 - TMS-1028: Add social-media link column to footer diff --git a/lib/Formatters/ExhibitionCarouselFormatter.php b/lib/Formatters/ExhibitionCarouselFormatter.php index 1e49d0e..025af23 100644 --- a/lib/Formatters/ExhibitionCarouselFormatter.php +++ b/lib/Formatters/ExhibitionCarouselFormatter.php @@ -58,6 +58,8 @@ public function format( array $data ) : array { $post_item->post_url = get_permalink( $post_item->ID ); } + $data['translations'] = ( new \Strings() )->s()['gallery'] ?? []; + return $data; } } diff --git a/partials/layouts/layout-image-carousel.dust b/partials/layouts/layout-image-carousel.dust index 7a054d1..7e6f807 100644 --- a/partials/layouts/layout-image-carousel.dust +++ b/partials/layouts/layout-image-carousel.dust @@ -34,7 +34,7 @@ aria-controls="{carousel_id|attr}-modal" aria-expanded="false" aria-haspopup="true" - aria-label="{translations.open}" + aria-label="{translations.open|attr}" > {@image id=image.id alt=image.alt title=image.alt size="medium_vertical" class="objectfit-image" width="{image.sizes.medium_vertical-width}" loading="" /} @@ -64,7 +64,7 @@ {! Slider inside the modal !}