diff --git a/CHANGELOG.md b/CHANGELOG.md index b9b0358b9d..5fde0240d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Draft +- Carousel buttons do not receive focus. [#1937](https://github.com/bigcommerce/cornerstone/pull/1937) - Empty cart message not read by screen reader. [#1935](https://github.com/bigcommerce/cornerstone/pull/1935) - No tooltips provided for carousel buttons. [#1934](https://github.com/bigcommerce/cornerstone/pull/1934) - Added announcement on shipping estimator errors. [#1932](https://github.com/bigcommerce/cornerstone/pull/1932) diff --git a/assets/js/theme/common/carousel/utils/setTabindexes.js b/assets/js/theme/common/carousel/utils/setTabindexes.js index 86335fc365..0fe2b1e103 100644 --- a/assets/js/theme/common/carousel/utils/setTabindexes.js +++ b/assets/js/theme/common/carousel/utils/setTabindexes.js @@ -4,7 +4,7 @@ export default ($slides, $prevArrow, $nextArrow, actualSlide, actualSlideCount) $slides.each((index, element) => { const $element = $(element); const tabIndex = $element.hasClass('slick-active') ? 0 : -1; - if (!$element.hasClass('js-product-slide')) { + if ($element.attr('href') !== undefined) { $element.attr('tabindex', tabIndex); } diff --git a/templates/components/carousel-content.html b/templates/components/carousel-content.html index bac1f1d5b0..4766512efa 100644 --- a/templates/components/carousel-content.html +++ b/templates/components/carousel-content.html @@ -2,6 +2,6 @@ {{{heading}}}
{{{text}}}
{{#if button_text}} - + {{button_text}} {{/if}} diff --git a/templates/components/carousel.html b/templates/components/carousel.html index 4bdd12fe52..42c845d4f7 100644 --- a/templates/components/carousel.html +++ b/templates/components/carousel.html @@ -19,7 +19,11 @@ {{/and}} {{#each carousel.slides}} + {{#if button_text}} +