Image Gallery Lightbox Links do not have a discernible name

Hello everyone.

When using the lightbox function of the Bricks Gallery I noticed that it is not completely accessible.

Is this already known and is a fix expected?

Is there a temporary solution like this one for the Mini-Cart?

add_filter( 'bricks/element/render_attributes', 'bu_minicart_link_aria_label', 10, 3 );
function bu_minicart_link_aria_label( $attributes, $key, $element_instance ) {
      if( $element_instance->name == 'woocommerce-mini-cart' && $key == 'a' ) {
            $attributes['a']['aria-label'] = 'ENETERARIALABEL';
      }
      return $attributes;
}

Thank you very much

Image Gallery: here is my workaround - insert below settings - page settings - custom code - Body (footer) scripts

<script>
document.addEventListener('DOMContentLoaded', function() {
const galleryItems = document.querySelectorAll('.brxe-image-gallery .bricks-layout-item');
galleryItems.forEach((item, index) => {
const link = item.querySelector('figure a');
if (link) {
// Fallback or custom label for accessibility
const customLabel = `Opens enlarged image ${index + 1}`;
link.setAttribute('aria-label', customLabel);
}
});
});
</script>
1 Like