Skip to content

feat(accessibility): Removed aria-exanded from modals and rewrote gallery js. - OEL-3726 #660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions src/compositions/bcl-gallery/__snapshots__/gallery.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="0"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -68,6 +69,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="1"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -102,6 +104,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="2"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -147,6 +150,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="3"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -181,6 +185,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="4"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -218,6 +223,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="5"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -252,6 +258,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="6"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -286,6 +293,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="7"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -313,6 +321,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="8"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -342,6 +351,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="9"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -380,6 +390,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="10"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -414,6 +425,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="11"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -459,6 +471,7 @@ exports[`OE - Gallery default renders correctly 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="12"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -917,6 +930,7 @@ exports[`OE - Gallery renders correctly with less than 5 items 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="0"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -951,6 +965,7 @@ exports[`OE - Gallery renders correctly with less than 5 items 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="1"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -985,6 +1000,7 @@ exports[`OE - Gallery renders correctly with less than 5 items 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="2"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1202,6 +1218,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="0"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1236,6 +1253,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="1"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1270,6 +1288,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="2"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1315,6 +1334,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="3"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1349,6 +1369,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="4"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1386,6 +1407,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="5"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1420,6 +1442,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="6"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1454,6 +1477,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="7"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1481,6 +1505,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="8"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1510,6 +1535,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="9"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1548,6 +1574,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="10"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1582,6 +1609,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="11"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -1627,6 +1655,7 @@ exports[`OE - Gallery renders correctly with new counter 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="12"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2090,6 +2119,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="0"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2124,6 +2154,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="1"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2158,6 +2189,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="2"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2203,6 +2235,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="3"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2237,6 +2270,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="4"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2274,6 +2308,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="5"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2308,6 +2343,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="6"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2342,6 +2378,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="7"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2369,6 +2406,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="8"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2398,6 +2436,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="9"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2436,6 +2475,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="10"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2470,6 +2510,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="11"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down Expand Up @@ -2515,6 +2556,7 @@ exports[`OE - Gallery renders correctly with title and link 1`] = `
class="bcl-gallery__item d-block w-100 img-fluid"
data-bs-slide-to="12"
data-bs-target="#carouselGalleryExample"
tabindex="0"
>
<div
class="bcl-gallery__item-overlay"
Expand Down
1 change: 1 addition & 0 deletions src/compositions/bcl-gallery/gallery-item.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Parameters:
{% set attributes = attributes.addClass(['bcl-gallery__item', 'd-block', 'w-100', 'img-fluid'])
.setAttribute('data-bs-target', '#' ~ _carousel_id)
.setAttribute('data-bs-slide-to', _carousel_anchor)
.setAttribute('tabindex', '0')
%}

<a
Expand Down
Loading
Loading