adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
723 stars 737 forks source link

accessibilityAutoItemTitles does not display Carousel slide titles #2746

Open HitmanInWis opened 1 month ago

HitmanInWis commented 1 month ago

Bug is present as of version: 2.24.7-SNAPSHOT

The following line in carousel.html attempts to set the aria-label for a slide to the panel title.

             aria-label="${(carousel.accessibilityAutoItemTitles && item.title) || 'Slide {0} of {1}' @ format=[itemList.count, carousel.items.size], i18n}"

However, if item.title does not have replacement tokens {0} and {1} the @ format command fails and returns an empty string, resulting in an empty aria-label rather than the actual slide title.