# SOLVED: Image Gallery Lightbox Links do not have a discernible name

**URL:** <https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703>\
**Category:** Feature Requests / Improvements\
**Created:** [October 2, 2024, 5:36am UTC](https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703 "2024-10-02T05:36:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cee23](https://forum.bricksbuilder.io/letter_avatar_proxy/v4/letter/c/2acd7d/32.png) [@cee23](https://forum.bricksbuilder.io/u/cee23)\
**Post date:** [October 2, 2024, 5:36am UTC](https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703/1 "2024-10-02T05:36:35Z")

</div>

Hello everyone.

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

 ![image](https://forum.bricksbuilder.io/uploads/default/original/3X/7/5/753674002afe4b0919ef9297061098d0e1dcdf25.png)

Is this already known and is a fix expected?

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

> **[Add aria-label attribute to Mini Cart link - BricksUltimate](https://www.bricksultimate.com/add-aria-label-attribute-to-mini-cart-link/)**
>
> The Mini Cart element of Bricks Builder is not adding the aria-label property to the anchor link. But you can add it with a small PHP code. Open the functions.php file of the bricks child theme or put the code in your 3rd party snippets plugin....

```auto
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

---

<div class="post-metadata">

**Author:** ![iTsMario](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/itsmario/32/4704_2.png) [@iTsMario](https://forum.bricksbuilder.io/u/iTsMario)\
**Post date:** [October 16, 2024, 6:55am UTC](https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703/3 "2024-10-16T06:55:04Z")

</div>

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

```auto
<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>

```

---

<div class="post-metadata">

**Author:** ![readone](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/readone/32/26106_2.png) [@readone](https://forum.bricksbuilder.io/u/readone)\
**Post date:** [May 29, 2025, 8:51am UTC](https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703/4 "2025-05-29T08:51:06Z")

</div>

![image](https://forum.bricksbuilder.io/uploads/default/original/3X/a/8/a8e9d99936e10e03f7a5642a9b84af180cda7180.png)  
You just need to add a custom attribute to that element, and the issue will be resolved.

---

<div class="post-metadata">

**Author:** ![jamie](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/jamie/32/24467_2.png) [@jamie](https://forum.bricksbuilder.io/u/jamie)\
**Post date:** [September 16, 2026, 11:18am UTC](https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703/5 "2026-09-16T11:18:28Z")

</div>

@readone This proposed solution doesn’t work, since the aria-label gets added to the gallery container rather than the links.

@timmse Is it possible (or could it be possible please) to add descriptive text for gallery lightbox links using `aria-label`? This can currently be done for normal image elements that have a lightbox link where the provided aria attribute gets added to the link element.

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [September 16, 2026, 11:48am UTC](https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703/6 "2026-09-16T11:48:55Z")

</div>

Hi @jamie,  
You’re right—the custom attribute suggested above applies to the gallery container, not to each lightbox link.

This issue is already tracked internally (we received a ticket about it).  
We’ll update this thread once it’s fixed.

---

<div class="post-metadata">

**Author:** ![jamie](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/jamie/32/24467_2.png) [@jamie](https://forum.bricksbuilder.io/u/jamie)\
**Post date:** [September 16, 2026, 12:03pm UTC](https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703/7 "2026-09-16T12:03:40Z")

</div>

Thanks @timmse

I ran into a similar issue with the `<video>` element used for “background” videos. In my case, a decorative video that accessibility audits are failing on due to missing `<track>` elements for captions. I was going to see how I might add an `aria-hidden` attribute to the video but don’t appear to be able to. Is this something that’s being tracked / should I open a separate issue?

---

<div class="post-metadata">

**Author:** ![timmse](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/timmse/32/1192_2.png) [@timmse](https://forum.bricksbuilder.io/u/timmse)\
**Post date:** [October 5, 2026, 8:30am UTC](https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703/8 "2026-10-05T08:30:09Z")

</div>

Hi @jamie, yes, please open a separate topic for the background-video issue so we can investigate it independently. Please include your Bricks version, the affected public page URL, and the exact accessibility audit warning. Also clarify whether you’re using Style → Background → Video or a Video element styled as a background.

---

<div class="post-metadata">

**Author:** ![jamie](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/jamie/32/24467_2.png) [@jamie](https://forum.bricksbuilder.io/u/jamie)\
**Post date:** [October 5, 2026, 9:36am UTC](https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703/9 "2026-10-05T09:36:37Z")

</div>

@timmse I have added [a new topic](https://forum.bricksbuilder.io/t/video-elements-must-have-captions-impact-critical-wcag-2-0-a/40489). Probably more a feature request than a bug.

---

<div class="post-metadata">

**Author:** ![bricks.assistant](https://forum.bricksbuilder.io/user_avatar/forum.bricksbuilder.io/bricks.assistant/32/32537_2.png) [@bricks.assistant](https://forum.bricksbuilder.io/u/bricks.assistant)\
**Post date:** [November 24, 2026, 9:41am UTC](https://forum.bricksbuilder.io/t/solved-image-gallery-lightbox-links-do-not-have-a-discernible-name/26703/10 "2026-11-24T09:41:08Z")

</div>

We’ve addressed this in Bricks 2.5-beta2 (beta release), now available for manual download from your Bricks account.

Image Gallery lightbox links now have accessible names for screen readers.

Please read the [changelog entry](https://bricksbuilder.io/release/bricks-2-5-beta2/) before testing, and let us know if you experience any issues. Beta builds are not intended for production sites.
