From 69f3b91076e6b31541b93382933c7221860745de Mon Sep 17 00:00:00 2001 From: Piotr Smykaj Date: Thu, 9 Apr 2026 22:16:50 +0200 Subject: [PATCH 1/9] OEL-4643: Add copyright_label. --- templates/patterns/banner/pattern-banner.html.twig | 1 + templates/patterns/card/pattern-card.html.twig | 1 + templates/patterns/carousel/pattern-carousel.html.twig | 1 + .../patterns/content_banner/pattern-content-banner.html.twig | 1 + .../patterns/featured_media/pattern-featured-media.html.twig | 1 + 5 files changed, 5 insertions(+) diff --git a/templates/patterns/banner/pattern-banner.html.twig b/templates/patterns/banner/pattern-banner.html.twig index 26f0bbb0f..dc15c9066 100644 --- a/templates/patterns/banner/pattern-banner.html.twig +++ b/templates/patterns/banner/pattern-banner.html.twig @@ -29,6 +29,7 @@ description: description, link: call_to_action, copyright: (variant == 'image' or variant == 'image_shade') ? copyright : '', + copyright_label: (variant == 'image' or variant == 'image_shade') ? 'Image credit:'|t : '', image: variant == 'image' or variant == 'image_shade' ? image : '' , content_classes: content_classes, attributes: attributes, diff --git a/templates/patterns/card/pattern-card.html.twig b/templates/patterns/card/pattern-card.html.twig index f9491d15d..178528477 100644 --- a/templates/patterns/card/pattern-card.html.twig +++ b/templates/patterns/card/pattern-card.html.twig @@ -42,6 +42,7 @@ 'title': title, 'title_tag': title_tag, 'image_copyright': image_copyright, + 'image_copyright_label': 'Image credit:'|t, 'subtitle': (subtitle is not empty) ? { 'content': subtitle, } : {}, diff --git a/templates/patterns/carousel/pattern-carousel.html.twig b/templates/patterns/carousel/pattern-carousel.html.twig index db2e76f7e..5f7d8ca5f 100644 --- a/templates/patterns/carousel/pattern-carousel.html.twig +++ b/templates/patterns/carousel/pattern-carousel.html.twig @@ -28,6 +28,7 @@ {% set _slides = _slides|merge([_item]) %} {% endfor %} {% include '@oe-bcl/carousel' with { + 'copyright_label': 'Image credit:'|t, 'title': title, 'title_tag': title_tag, 'id': carousel_id, diff --git a/templates/patterns/content_banner/pattern-content-banner.html.twig b/templates/patterns/content_banner/pattern-content-banner.html.twig index ede56d7be..baa8c2bd6 100644 --- a/templates/patterns/content_banner/pattern-content-banner.html.twig +++ b/templates/patterns/content_banner/pattern-content-banner.html.twig @@ -42,6 +42,7 @@ 'alt': image.alt, } : {}, 'copyright': copyright, + 'copyright_label': 'Image credit:'|t, 'image_size': image_size ?? 'lg', 'badges': _badges, 'links': links, diff --git a/templates/patterns/featured_media/pattern-featured-media.html.twig b/templates/patterns/featured_media/pattern-featured-media.html.twig index 4a2e69922..0c4a3f06a 100644 --- a/templates/patterns/featured_media/pattern-featured-media.html.twig +++ b/templates/patterns/featured_media/pattern-featured-media.html.twig @@ -12,6 +12,7 @@ 'content_classes': 'bg-light p-3', 'ratio': ratio, 'copyright': copyright, + 'copyright_label': 'Image credit:'|t, } only %} {% endmacro %} From 3c4ef310bdbd10fe64fe54c99d847c8c9c91ef0f Mon Sep 17 00:00:00 2001 From: Piotr Smykaj Date: Fri, 10 Apr 2026 12:52:27 +0200 Subject: [PATCH 2/9] OEL-4643: Add the "aria-describedby" attribute to the tag. --- includes/pattern.inc | 47 +++++++++++++++++++ .../patterns/card/pattern-card.html.twig | 1 + .../pattern-content-banner.html.twig | 1 + .../pattern-featured-media.html.twig | 7 +-- .../gallery/pattern-gallery.html.twig | 1 + 5 files changed, 54 insertions(+), 3 deletions(-) diff --git a/includes/pattern.inc b/includes/pattern.inc index eec8b6000..2bb7e4d14 100644 --- a/includes/pattern.inc +++ b/includes/pattern.inc @@ -50,6 +50,13 @@ function oe_bootstrap_theme_preprocess_pattern_dropdown(array &$variables) { */ function oe_bootstrap_theme_preprocess_pattern_carousel(array &$variables) { $variables['carousel_id'] = Html::getUniqueId('bcl-carousel'); + foreach ($variables['slides'] as &$slide) { + if (!empty($slide['copyright'])) { + $desc_id = Html::getUniqueId('bcl-carousel-img-desc'); + $slide['image']['aria-describedby'] = $desc_id; + $slide['description_id'] = $desc_id; + } + } } /** @@ -167,6 +174,12 @@ function oe_bootstrap_theme_preprocess_pattern_featured_media(&$variables) { else { $variables['image']['#attributes']['class'] = ['flex-end-100']; } + + if (!empty($variables['copyright'])) { + $desc_id = Html::getUniqueId('bcl-featured-media-img-desc'); + $variables['image']['#attributes']['aria-describedby'] = $desc_id; + $variables['image_description_id'] = $desc_id; + } } /** @@ -286,6 +299,16 @@ function oe_bootstrap_theme_preprocess_pattern_pagination__preview(array &$varia */ function oe_bootstrap_theme_preprocess_pattern_gallery(array &$variables): void { $variables['id'] = Html::getUniqueId('bcl-gallery'); + foreach ($variables['items'] as &$item) { + if (empty($item['copyright'])) { + continue; + } + $desc_id = Html::getUniqueId('bcl-gallery-img-desc'); + $item['description_id'] = $desc_id; + if (isset($item['media']['#attributes'])) { + $item['media']['#attributes']['aria-describedby'] = $desc_id; + } + } } /** @@ -310,4 +333,28 @@ function oe_bootstrap_theme_preprocess_pattern_gallery__preview(array &$variable function oe_bootstrap_theme_preprocess_pattern_card(array &$variables): void { $variables['bc_card_search_image_hide_on_mobile'] = BackwardCompatibility::getSetting('card_search_image_hide_on_mobile'); $variables['bc_card_search_use_grid_classes'] = BackwardCompatibility::getSetting('card_search_use_grid_classes'); + if (!empty($variables['image_copyright'])) { + $variables['image_description_id'] = Html::getUniqueId('bcl-card-img-desc'); + } +} + +/** + * Implements hook_preprocess_HOOK() for content banner pattern. + */ +function oe_bootstrap_theme_preprocess_pattern_content_banner(array &$variables): void { + if (!empty($variables['copyright'])) { + $variables['image_description_id'] = Html::getUniqueId('bcl-content-banner-img-desc'); + } +} + +/** + * Implements hook_preprocess_HOOK() for listing pattern. + */ +function oe_bootstrap_theme_preprocess_pattern_listing(array &$variables): void { + foreach ($variables['items'] as &$item) { + if (!empty($item['image_copyright'])) { + $item['image_copyright_label'] = t('Image credit:'); + $item['image_description_id'] = Html::getUniqueId('bcl-listing-img-desc'); + } + } } diff --git a/templates/patterns/card/pattern-card.html.twig b/templates/patterns/card/pattern-card.html.twig index 178528477..a1a64dd16 100644 --- a/templates/patterns/card/pattern-card.html.twig +++ b/templates/patterns/card/pattern-card.html.twig @@ -43,6 +43,7 @@ 'title_tag': title_tag, 'image_copyright': image_copyright, 'image_copyright_label': 'Image credit:'|t, + 'image_description_id': image_description_id, 'subtitle': (subtitle is not empty) ? { 'content': subtitle, } : {}, diff --git a/templates/patterns/content_banner/pattern-content-banner.html.twig b/templates/patterns/content_banner/pattern-content-banner.html.twig index baa8c2bd6..8ac7fb833 100644 --- a/templates/patterns/content_banner/pattern-content-banner.html.twig +++ b/templates/patterns/content_banner/pattern-content-banner.html.twig @@ -43,6 +43,7 @@ } : {}, 'copyright': copyright, 'copyright_label': 'Image credit:'|t, + 'image_description_id': image_description_id, 'image_size': image_size ?? 'lg', 'badges': _badges, 'links': links, diff --git a/templates/patterns/featured_media/pattern-featured-media.html.twig b/templates/patterns/featured_media/pattern-featured-media.html.twig index 0c4a3f06a..c63fe5780 100644 --- a/templates/patterns/featured_media/pattern-featured-media.html.twig +++ b/templates/patterns/featured_media/pattern-featured-media.html.twig @@ -4,7 +4,7 @@ * Featured media pattern. */ #} -{% macro featured_media(embedded_media, image, caption, ratio, copyright) %} +{% macro featured_media(embedded_media, image, caption, ratio, copyright, image_description_id) %} {% include '@oe-bcl/featured-media' with { 'embedded_media': embedded_media, 'image': image, @@ -13,6 +13,7 @@ 'ratio': ratio, 'copyright': copyright, 'copyright_label': 'Image credit:'|t, + 'image_description_id': image_description_id, } only %} {% endmacro %} @@ -65,13 +66,13 @@ {% endif %}
- {{- _self.featured_media(embedded_media, image, caption, ratio, copyright) -}} + {{- _self.featured_media(embedded_media, image, caption, ratio, copyright, image_description_id) -}}
{% else %}
- {{- _self.featured_media(embedded_media, image, caption, ratio, copyright) -}} + {{- _self.featured_media(embedded_media, image, caption, ratio, copyright, image_description_id) -}}
{% endif %} diff --git a/templates/patterns/gallery/pattern-gallery.html.twig b/templates/patterns/gallery/pattern-gallery.html.twig index 99815fa9f..fd25e991b 100644 --- a/templates/patterns/gallery/pattern-gallery.html.twig +++ b/templates/patterns/gallery/pattern-gallery.html.twig @@ -20,6 +20,7 @@ prev_label: _prev_label, next_label: _next_label, autoplay: false, + copyright_label: 'Image credit:'|t, items: items|map(_item => _item|merge({ caption: _item.is_playable ? '' : _item.caption, caption_title: _item.is_playable ? '' : _item.caption_title, From 92c34b7757928c44ef4d3e5381126cdb1be13d3e Mon Sep 17 00:00:00 2001 From: Piotr Smykaj Date: Fri, 10 Apr 2026 14:08:41 +0200 Subject: [PATCH 3/9] OEL-4643: Update BCL. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 216ac763a..feeb3e216 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "production": "npm-run-all build:*" }, "devDependencies": { - "@openeuropa/bcl-builder": "^1.11", - "@openeuropa/bcl-theme-default": "^1.11", + "@openeuropa/bcl-builder": "0.4643.202604101500", + "@openeuropa/bcl-theme-default": "0.4643.202604101500", "bootstrap-ie11": "5.0.2", "chokidar-cli": "^3.0.0", "copyfiles": "2.4.1", From 12cd38033777067a2087f214b0b9c287493fa620 Mon Sep 17 00:00:00 2001 From: Piotr Smykaj Date: Sun, 12 Apr 2026 22:50:13 +0200 Subject: [PATCH 4/9] OEL-4643: Fix tests. --- includes/pattern.inc | 12 ++++++++---- .../fixtures/markup_rendering_patterns/card.yml | 2 +- .../fixtures/markup_rendering_patterns/carousel.yml | 2 +- .../fixtures/markup_rendering_patterns/listing.yml | 8 ++++---- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/includes/pattern.inc b/includes/pattern.inc index 2bb7e4d14..c0599d446 100644 --- a/includes/pattern.inc +++ b/includes/pattern.inc @@ -50,12 +50,16 @@ function oe_bootstrap_theme_preprocess_pattern_dropdown(array &$variables) { */ function oe_bootstrap_theme_preprocess_pattern_carousel(array &$variables) { $variables['carousel_id'] = Html::getUniqueId('bcl-carousel'); + if (empty($variables['slides'])) { + return; + } foreach ($variables['slides'] as &$slide) { - if (!empty($slide['copyright'])) { - $desc_id = Html::getUniqueId('bcl-carousel-img-desc'); - $slide['image']['aria-describedby'] = $desc_id; - $slide['description_id'] = $desc_id; + if (empty($slide['copyright'])) { + continue; } + $desc_id = Html::getUniqueId('bcl-carousel-img-desc'); + $slide['image']['aria-describedby'] = $desc_id; + $slide['description_id'] = $desc_id; } } diff --git a/tests/src/Kernel/fixtures/markup_rendering_patterns/card.yml b/tests/src/Kernel/fixtures/markup_rendering_patterns/card.yml index 167430672..68a9838ef 100644 --- a/tests/src/Kernel/fixtures/markup_rendering_patterns/card.yml +++ b/tests/src/Kernel/fixtures/markup_rendering_patterns/card.yml @@ -179,4 +179,4 @@ card_with_image_copyright: 'article.card img.card-img-top': 1 'article.card .bcl-card__image-footer .bcl-copyright': 1 equals: - 'article.card .bcl-copyright': '© 2024 Example Organisation' + 'article.card .bcl-copyright': 'Image credit:© 2024 Example Organisation' diff --git a/tests/src/Kernel/fixtures/markup_rendering_patterns/carousel.yml b/tests/src/Kernel/fixtures/markup_rendering_patterns/carousel.yml index 379fabb44..d16e44eab 100644 --- a/tests/src/Kernel/fixtures/markup_rendering_patterns/carousel.yml +++ b/tests/src/Kernel/fixtures/markup_rendering_patterns/carousel.yml @@ -141,7 +141,7 @@ carousel_with_copyright_overlay: class: Drupal\Tests\oe_bootstrap_theme\PatternAssertion\CarouselPatternAssert expected: items: - - image: 'alt image 1' + - image: 'alt image 1' caption_title: 'First slide title' caption: 'First slide caption' copyright: '© 2024 Example Organisation' diff --git a/tests/src/Kernel/fixtures/markup_rendering_patterns/listing.yml b/tests/src/Kernel/fixtures/markup_rendering_patterns/listing.yml index b85c0b9f3..cf955a7cc 100644 --- a/tests/src/Kernel/fixtures/markup_rendering_patterns/listing.yml +++ b/tests/src/Kernel/fixtures/markup_rendering_patterns/listing.yml @@ -546,7 +546,7 @@ listing_default_1_col_with_image_copyright: 'article.listing-item': 1 'article.listing-item .bcl-card__image-footer .bcl-copyright': 1 equals: - 'article.listing-item .bcl-copyright': '© 2024 Example Organisation' + 'article.listing-item .bcl-copyright': 'Image credit:© 2024 Example Organisation' listing_default_2_col_with_image_copyright: render: '#type': pattern @@ -568,7 +568,7 @@ listing_default_2_col_with_image_copyright: 'article.listing-item': 1 'article.listing-item .bcl-card__image-footer .bcl-copyright': 1 equals: - 'article.listing-item .bcl-copyright': '© 2024 Example Organisation' + 'article.listing-item .bcl-copyright': 'Image credit:© 2024 Example Organisation' listing_default_1_col_highlight_with_image_copyright: render: '#type': pattern @@ -591,7 +591,7 @@ listing_default_1_col_highlight_with_image_copyright: 'article.listing-item--highlight .bcl-card__image-footer .bcl-copyright': 1 'article.listing-item--highlight .card-body.pt-3': 1 equals: - 'article.listing-item--highlight .bcl-copyright': '© 2024 Example Organisation' + 'article.listing-item--highlight .bcl-copyright': 'Image credit:© 2024 Example Organisation' listing_default_2_col_highlight_with_image_copyright: render: '#type': pattern @@ -614,4 +614,4 @@ listing_default_2_col_highlight_with_image_copyright: 'article.listing-item--highlight .bcl-card__image-footer .bcl-copyright': 1 'article.listing-item--highlight .card-body.pt-3': 1 equals: - 'article.listing-item--highlight .bcl-copyright': '© 2024 Example Organisation' + 'article.listing-item--highlight .bcl-copyright': 'Image credit:© 2024 Example Organisation' From d904582a918690fbad4cac2689855db8511d62c2 Mon Sep 17 00:00:00 2001 From: Piotr Smykaj Date: Thu, 16 Apr 2026 09:35:22 +0200 Subject: [PATCH 5/9] OEL-4643: If the
and
are done correctly, we don't need aria-describedby. --- includes/pattern.inc | 40 ------------------- .../patterns/card/pattern-card.html.twig | 1 - .../pattern-content-banner.html.twig | 1 - .../pattern-featured-media.html.twig | 7 ++-- .../markup_rendering_patterns/carousel.yml | 2 +- 5 files changed, 4 insertions(+), 47 deletions(-) diff --git a/includes/pattern.inc b/includes/pattern.inc index c0599d446..65bf5893e 100644 --- a/includes/pattern.inc +++ b/includes/pattern.inc @@ -50,17 +50,6 @@ function oe_bootstrap_theme_preprocess_pattern_dropdown(array &$variables) { */ function oe_bootstrap_theme_preprocess_pattern_carousel(array &$variables) { $variables['carousel_id'] = Html::getUniqueId('bcl-carousel'); - if (empty($variables['slides'])) { - return; - } - foreach ($variables['slides'] as &$slide) { - if (empty($slide['copyright'])) { - continue; - } - $desc_id = Html::getUniqueId('bcl-carousel-img-desc'); - $slide['image']['aria-describedby'] = $desc_id; - $slide['description_id'] = $desc_id; - } } /** @@ -178,12 +167,6 @@ function oe_bootstrap_theme_preprocess_pattern_featured_media(&$variables) { else { $variables['image']['#attributes']['class'] = ['flex-end-100']; } - - if (!empty($variables['copyright'])) { - $desc_id = Html::getUniqueId('bcl-featured-media-img-desc'); - $variables['image']['#attributes']['aria-describedby'] = $desc_id; - $variables['image_description_id'] = $desc_id; - } } /** @@ -303,16 +286,6 @@ function oe_bootstrap_theme_preprocess_pattern_pagination__preview(array &$varia */ function oe_bootstrap_theme_preprocess_pattern_gallery(array &$variables): void { $variables['id'] = Html::getUniqueId('bcl-gallery'); - foreach ($variables['items'] as &$item) { - if (empty($item['copyright'])) { - continue; - } - $desc_id = Html::getUniqueId('bcl-gallery-img-desc'); - $item['description_id'] = $desc_id; - if (isset($item['media']['#attributes'])) { - $item['media']['#attributes']['aria-describedby'] = $desc_id; - } - } } /** @@ -337,18 +310,6 @@ function oe_bootstrap_theme_preprocess_pattern_gallery__preview(array &$variable function oe_bootstrap_theme_preprocess_pattern_card(array &$variables): void { $variables['bc_card_search_image_hide_on_mobile'] = BackwardCompatibility::getSetting('card_search_image_hide_on_mobile'); $variables['bc_card_search_use_grid_classes'] = BackwardCompatibility::getSetting('card_search_use_grid_classes'); - if (!empty($variables['image_copyright'])) { - $variables['image_description_id'] = Html::getUniqueId('bcl-card-img-desc'); - } -} - -/** - * Implements hook_preprocess_HOOK() for content banner pattern. - */ -function oe_bootstrap_theme_preprocess_pattern_content_banner(array &$variables): void { - if (!empty($variables['copyright'])) { - $variables['image_description_id'] = Html::getUniqueId('bcl-content-banner-img-desc'); - } } /** @@ -358,7 +319,6 @@ function oe_bootstrap_theme_preprocess_pattern_listing(array &$variables): void foreach ($variables['items'] as &$item) { if (!empty($item['image_copyright'])) { $item['image_copyright_label'] = t('Image credit:'); - $item['image_description_id'] = Html::getUniqueId('bcl-listing-img-desc'); } } } diff --git a/templates/patterns/card/pattern-card.html.twig b/templates/patterns/card/pattern-card.html.twig index a1a64dd16..178528477 100644 --- a/templates/patterns/card/pattern-card.html.twig +++ b/templates/patterns/card/pattern-card.html.twig @@ -43,7 +43,6 @@ 'title_tag': title_tag, 'image_copyright': image_copyright, 'image_copyright_label': 'Image credit:'|t, - 'image_description_id': image_description_id, 'subtitle': (subtitle is not empty) ? { 'content': subtitle, } : {}, diff --git a/templates/patterns/content_banner/pattern-content-banner.html.twig b/templates/patterns/content_banner/pattern-content-banner.html.twig index 8ac7fb833..baa8c2bd6 100644 --- a/templates/patterns/content_banner/pattern-content-banner.html.twig +++ b/templates/patterns/content_banner/pattern-content-banner.html.twig @@ -43,7 +43,6 @@ } : {}, 'copyright': copyright, 'copyright_label': 'Image credit:'|t, - 'image_description_id': image_description_id, 'image_size': image_size ?? 'lg', 'badges': _badges, 'links': links, diff --git a/templates/patterns/featured_media/pattern-featured-media.html.twig b/templates/patterns/featured_media/pattern-featured-media.html.twig index c63fe5780..0c4a3f06a 100644 --- a/templates/patterns/featured_media/pattern-featured-media.html.twig +++ b/templates/patterns/featured_media/pattern-featured-media.html.twig @@ -4,7 +4,7 @@ * Featured media pattern. */ #} -{% macro featured_media(embedded_media, image, caption, ratio, copyright, image_description_id) %} +{% macro featured_media(embedded_media, image, caption, ratio, copyright) %} {% include '@oe-bcl/featured-media' with { 'embedded_media': embedded_media, 'image': image, @@ -13,7 +13,6 @@ 'ratio': ratio, 'copyright': copyright, 'copyright_label': 'Image credit:'|t, - 'image_description_id': image_description_id, } only %} {% endmacro %} @@ -66,13 +65,13 @@ {% endif %}
- {{- _self.featured_media(embedded_media, image, caption, ratio, copyright, image_description_id) -}} + {{- _self.featured_media(embedded_media, image, caption, ratio, copyright) -}}
{% else %}
- {{- _self.featured_media(embedded_media, image, caption, ratio, copyright, image_description_id) -}} + {{- _self.featured_media(embedded_media, image, caption, ratio, copyright) -}}
{% endif %} diff --git a/tests/src/Kernel/fixtures/markup_rendering_patterns/carousel.yml b/tests/src/Kernel/fixtures/markup_rendering_patterns/carousel.yml index d16e44eab..379fabb44 100644 --- a/tests/src/Kernel/fixtures/markup_rendering_patterns/carousel.yml +++ b/tests/src/Kernel/fixtures/markup_rendering_patterns/carousel.yml @@ -141,7 +141,7 @@ carousel_with_copyright_overlay: class: Drupal\Tests\oe_bootstrap_theme\PatternAssertion\CarouselPatternAssert expected: items: - - image: 'alt image 1' + - image: 'alt image 1' caption_title: 'First slide title' caption: 'First slide caption' copyright: '© 2024 Example Organisation' From 855ca87c0d139573cec26f4e6430d9db2931ce55 Mon Sep 17 00:00:00 2001 From: Piotr Smykaj Date: Tue, 21 Apr 2026 14:33:22 +0200 Subject: [PATCH 6/9] OEL-4643: Better formatting and changed copyright label to be more generic. --- .../patterns/featured_media/pattern-featured-media.html.twig | 2 +- templates/patterns/gallery/pattern-gallery.html.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/patterns/featured_media/pattern-featured-media.html.twig b/templates/patterns/featured_media/pattern-featured-media.html.twig index 0c4a3f06a..88079b0d9 100644 --- a/templates/patterns/featured_media/pattern-featured-media.html.twig +++ b/templates/patterns/featured_media/pattern-featured-media.html.twig @@ -12,7 +12,7 @@ 'content_classes': 'bg-light p-3', 'ratio': ratio, 'copyright': copyright, - 'copyright_label': 'Image credit:'|t, + 'copyright_label': image is not empty ? 'Image credit:'|t : 'Copyright:'|t, } only %} {% endmacro %} diff --git a/templates/patterns/gallery/pattern-gallery.html.twig b/templates/patterns/gallery/pattern-gallery.html.twig index fd25e991b..1853d43fa 100644 --- a/templates/patterns/gallery/pattern-gallery.html.twig +++ b/templates/patterns/gallery/pattern-gallery.html.twig @@ -20,11 +20,11 @@ prev_label: _prev_label, next_label: _next_label, autoplay: false, - copyright_label: 'Image credit:'|t, items: items|map(_item => _item|merge({ caption: _item.is_playable ? '' : _item.caption, caption_title: _item.is_playable ? '' : _item.caption_title, link: _item.is_playable ? '' : _item.link, + copyright_label: _item.is_playable ? 'Copyright:'|t : 'Image credit:'|t, })), } only %} {% endblock %} From 9e4c49ee8e3c949d4537039c24f0ccf8ccc7da2c Mon Sep 17 00:00:00 2001 From: Piotr Smykaj Date: Tue, 21 Apr 2026 21:47:11 +0200 Subject: [PATCH 7/9] OEL-4643: Update BCL. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index feeb3e216..34fab3250 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "production": "npm-run-all build:*" }, "devDependencies": { - "@openeuropa/bcl-builder": "0.4643.202604101500", - "@openeuropa/bcl-theme-default": "0.4643.202604101500", + "@openeuropa/bcl-builder": "0.4643.202605041650", + "@openeuropa/bcl-theme-default": "0.4643.202605041650", "bootstrap-ie11": "5.0.2", "chokidar-cli": "^3.0.0", "copyfiles": "2.4.1", From c2f6757844227e165bb12315ee965131fa85e288 Mon Sep 17 00:00:00 2001 From: Piotr Smykaj Date: Tue, 21 Apr 2026 22:16:07 +0200 Subject: [PATCH 8/9] OEL-4643: Update test. --- .../markup_rendering_patterns/card.yml | 2 +- .../featured_media.yml | 28 +++++++++---------- .../markup_rendering_patterns/listing.yml | 8 +++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/src/Kernel/fixtures/markup_rendering_patterns/card.yml b/tests/src/Kernel/fixtures/markup_rendering_patterns/card.yml index 68a9838ef..dfd336a8c 100644 --- a/tests/src/Kernel/fixtures/markup_rendering_patterns/card.yml +++ b/tests/src/Kernel/fixtures/markup_rendering_patterns/card.yml @@ -179,4 +179,4 @@ card_with_image_copyright: 'article.card img.card-img-top': 1 'article.card .bcl-card__image-footer .bcl-copyright': 1 equals: - 'article.card .bcl-copyright': 'Image credit:© 2024 Example Organisation' + 'article.card .bcl-copyright': 'Image credit: © 2024 Example Organisation' diff --git a/tests/src/Kernel/fixtures/markup_rendering_patterns/featured_media.yml b/tests/src/Kernel/fixtures/markup_rendering_patterns/featured_media.yml index 555032e1e..df326aff0 100644 --- a/tests/src/Kernel/fixtures/markup_rendering_patterns/featured_media.yml +++ b/tests/src/Kernel/fixtures/markup_rendering_patterns/featured_media.yml @@ -21,13 +21,13 @@ featured_media_image_not_wrapper: 'div.bcl-featured-media > div.row > div.col-12.col-md-4': 1 'div.bcl-featured-media > div.row > div.col-12.col-md-4 > figure': 1 'figure > img.img-fluid.flex-end-100': 1 - 'figure > figcaption.bg-light.p-3': 1 + 'figure > figcaption > div.bg-light.p-3': 1 'h2': 0 'h5': 0 'a': 0 '.md-6,.order-1,.order-2': 0 equals: - 'figcaption': 'Media description text goes here.' + 'figcaption > div.bg-light.p-3': 'Media description text goes here.' featured_media_image_with_copyright_overlay: render: '#type': pattern @@ -75,7 +75,7 @@ featured_media_image_with_title_tag: 'div.bcl-featured-media > div.row > div.col-12.col-md-6.order-2': 1 'div.bcl-featured-media > div.row > div.col-12.col-md-6.order-2 > figure': 1 'figure > img.img-fluid.flex-end-100': 1 - 'figure > figcaption.bg-light.p-3': 1 + 'figure > figcaption > div.bg-light.p-3': 1 'h1.mb-4': 1 'h5': 0 'a': 0 @@ -83,7 +83,7 @@ featured_media_image_with_title_tag: equals: 'h1.bcl-heading': 'Title' 'div.col-12.col-md-6.order-1': 'Lorem Ipsum dolor sit amet.' - 'figcaption': 'Media description text goes here.' + 'figcaption > div.bg-light.p-3': 'Media description text goes here.' featured_media_image_with_text_aligned_left: render: '#type': pattern @@ -113,7 +113,7 @@ featured_media_image_with_text_aligned_left: 'div.bcl-featured-media > div.row > div.col-12.col-md-6.order-2': 1 'div.bcl-featured-media > div.row > div.col-12.col-md-6.order-2 > figure': 1 'figure > img.img-fluid.flex-end-100': 1 - 'figure > figcaption.bg-light.p-3': 1 + 'figure > figcaption > div.bg-light.p-3': 1 'h2.mb-4': 1 'h5': 0 'a': 0 @@ -121,7 +121,7 @@ featured_media_image_with_text_aligned_left: equals: 'h2.bcl-heading': 'Title' 'div.col-12.col-md-6.order-1': 'Lorem Ipsum dolor sit amet.' - 'figcaption': 'Media description text goes here.' + 'figcaption > div.bg-light.p-3': 'Media description text goes here.' featured_media_image_with_text_aligned_right: render: '#type': pattern @@ -151,7 +151,7 @@ featured_media_image_with_text_aligned_right: 'div.bcl-featured-media > div.row > div.col-12.col-md-6.order-1 > figure': 1 'div.bcl-featured-media > div.row > div.col-12.col-md-6.order-2': 1 'figure > img.img-fluid.flex-end-100': 1 - 'figure > figcaption.bg-light.p-3': 1 + 'figure > figcaption > div.bg-light.p-3': 1 'h2.mb-4': 1 'h5': 0 'a': 0 @@ -159,7 +159,7 @@ featured_media_image_with_text_aligned_right: equals: 'h2': 'Title' 'div.col-12.col-md-6.order-2': 'Lorem Ipsum dolor sit amet.' - 'figcaption': 'Media description text goes here.' + 'figcaption > div.bg-light.p-3': 'Media description text goes here.' featured_media_iframe_not_wrapper: render: '#type': pattern @@ -186,13 +186,13 @@ featured_media_iframe_not_wrapper: 'div.bcl-featured-media > div.row > div.col-12.col-md-4': 1 'div.bcl-featured-media > div.row > div.col-12.col-md-4 > figure': 1 'figure > div.ratio.ratio-16x9': 1 - 'figure > figcaption.bg-light.p-3': 1 + 'figure > figcaption > div.bg-light.p-3': 1 'h2': 0 'h5': 0 'a': 0 '.md-6,.order-1,.order-2': 0 equals: - 'figcaption': 'Media description text goes here.' + 'figcaption > div.bg-light.p-3': 'Media description text goes here.' featured_media_iframe_with_text_container_left_aligned_with_default_ratio: render: '#type': pattern @@ -224,7 +224,7 @@ featured_media_iframe_with_text_container_left_aligned_with_default_ratio: 'div.bcl-featured-media > div.row > div.col-12.col-md-6.order-2': 1 'div.bcl-featured-media > div.row > div.col-12.col-md-6.order-2 > figure': 1 'figure > div.ratio.ratio-16x9': 1 - 'figure > figcaption.bg-light.p-3': 1 + 'figure > figcaption > div.bg-light.p-3': 1 'h2.mb-4': 1 'h5': 0 'a': 0 @@ -232,7 +232,7 @@ featured_media_iframe_with_text_container_left_aligned_with_default_ratio: equals: 'h2': 'Title' 'div.col-12.col-md-6.order-1': 'Lorem Ipsum dolor sit amet.' - 'figcaption': 'Media description text goes here.' + 'figcaption > div.bg-light.p-3': 'Media description text goes here.' featured_media_iframe_with_text_container_right_aligned_with_link_ratio_21x9: render: '#type': pattern @@ -269,7 +269,7 @@ featured_media_iframe_with_text_container_right_aligned_with_link_ratio_21x9: 'div.bcl-featured-media > div.row > div.col-12.col-md-6.order-2': 1 'div.bcl-featured-media > div.row > div.col-12.col-md-6.order-2 > a': 1 'figure > div.ratio.ratio-21x9': 1 - 'figure > figcaption.bg-light.p-3': 1 + 'figure > figcaption > div.bg-light.p-3': 1 'h2.mb-4': 1 'h5': 0 'a': 1 @@ -277,7 +277,7 @@ featured_media_iframe_with_text_container_right_aligned_with_link_ratio_21x9: '.md-6': 0 equals: 'h2': 'Title' - 'figcaption': 'Media description text goes here.' + 'figcaption > div.bg-light.p-3': 'Media description text goes here.' contains: 'div.col-12.col-md-6.order-2': 'Lorem Ipsum dolor sit amet.' 'div.col-12.col-md-6.order-2 a': 'View all' diff --git a/tests/src/Kernel/fixtures/markup_rendering_patterns/listing.yml b/tests/src/Kernel/fixtures/markup_rendering_patterns/listing.yml index cf955a7cc..21e7d7588 100644 --- a/tests/src/Kernel/fixtures/markup_rendering_patterns/listing.yml +++ b/tests/src/Kernel/fixtures/markup_rendering_patterns/listing.yml @@ -546,7 +546,7 @@ listing_default_1_col_with_image_copyright: 'article.listing-item': 1 'article.listing-item .bcl-card__image-footer .bcl-copyright': 1 equals: - 'article.listing-item .bcl-copyright': 'Image credit:© 2024 Example Organisation' + 'article.listing-item .bcl-copyright': 'Image credit: © 2024 Example Organisation' listing_default_2_col_with_image_copyright: render: '#type': pattern @@ -568,7 +568,7 @@ listing_default_2_col_with_image_copyright: 'article.listing-item': 1 'article.listing-item .bcl-card__image-footer .bcl-copyright': 1 equals: - 'article.listing-item .bcl-copyright': 'Image credit:© 2024 Example Organisation' + 'article.listing-item .bcl-copyright': 'Image credit: © 2024 Example Organisation' listing_default_1_col_highlight_with_image_copyright: render: '#type': pattern @@ -591,7 +591,7 @@ listing_default_1_col_highlight_with_image_copyright: 'article.listing-item--highlight .bcl-card__image-footer .bcl-copyright': 1 'article.listing-item--highlight .card-body.pt-3': 1 equals: - 'article.listing-item--highlight .bcl-copyright': 'Image credit:© 2024 Example Organisation' + 'article.listing-item--highlight .bcl-copyright': 'Image credit: © 2024 Example Organisation' listing_default_2_col_highlight_with_image_copyright: render: '#type': pattern @@ -614,4 +614,4 @@ listing_default_2_col_highlight_with_image_copyright: 'article.listing-item--highlight .bcl-card__image-footer .bcl-copyright': 1 'article.listing-item--highlight .card-body.pt-3': 1 equals: - 'article.listing-item--highlight .bcl-copyright': 'Image credit:© 2024 Example Organisation' + 'article.listing-item--highlight .bcl-copyright': 'Image credit: © 2024 Example Organisation' From 0f2e103486121a922283eed89906c8a199486150 Mon Sep 17 00:00:00 2001 From: Piotr Smykaj Date: Wed, 6 May 2026 10:46:55 +0200 Subject: [PATCH 9/9] OEL-4643: Update BCL. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 34fab3250..9bea0fd42 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "production": "npm-run-all build:*" }, "devDependencies": { - "@openeuropa/bcl-builder": "0.4643.202605041650", - "@openeuropa/bcl-theme-default": "0.4643.202605041650", + "@openeuropa/bcl-builder": "0.4643.202605061520", + "@openeuropa/bcl-theme-default": "0.4643.202605061520", "bootstrap-ie11": "5.0.2", "chokidar-cli": "^3.0.0", "copyfiles": "2.4.1",