Closed graphicidentity closed 2 years ago
altered altFixes() to apply aria-label to img alt in narrative components
// check if img is in narrative component if ($(this).parents('.narrative-component').length == 1) { var widget = $(this).closest('.narrative-widget'); var imgIndex = $(this).parents('.narrative-slider-graphic').attr('data-index'); var altText = widget.find('div.narrative-content-item[data-index="' + imgIndex + '"]>div.aria-label').attr('aria-label'); $(this).attr('alt', altText) }
In some Adapt component the Aria label text is not converted to alt text. For example, the image in the narrative component still uses Aria.