Skip to content

Commit 1a1a920

Browse files
committed
OEL-4360: Update heading tag in mega menu.
1 parent 5573869 commit 1a1a920

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

modules/oe_bootstrap_theme_helper/src/Plugin/Block/MegaMenuBlock.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,10 @@ protected function buildContentBlock(array $item): array {
239239
$content_block = [
240240
'title' => [
241241
'#type' => 'html_tag',
242-
'#tag' => 'h4',
242+
'#tag' => 'div',
243+
'#attributes' => [
244+
'class' => ['h4'],
245+
],
243246
'#value' => $item['title'],
244247
],
245248
];

modules/oe_bootstrap_theme_helper/tests/src/Kernel/MegaMenuBlockTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ protected function addTree(array &$expected_items, string $name, bool $nolink =
148148
'content_block' => [
149149
'title' => [
150150
'#type' => 'html_tag',
151-
'#tag' => 'h4',
151+
'#tag' => 'div',
152+
'#attributes' => [
153+
'class' => ['h4'],
154+
],
152155
'#value' => "Link to '$name'",
153156
],
154157
'text' => [

patches/npm/@openeuropa+bcl-theme-default+1.2.0.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ diff --git a/node_modules/@openeuropa/bcl-theme-default/templates/bcl-link/link.
22
index 171972f..aa94eb3 100644
33
--- a/node_modules/@openeuropa/bcl-theme-default/templates/bcl-link/link.html.twig
44
+++ b/node_modules/@openeuropa/bcl-theme-default/templates/bcl-link/link.html.twig
5-
@@ -72,18 +72,19 @@
5+
@@ -70,17 +70,17 @@
66
{% if _classes is not empty %}
7-
{% set attributes = attributes.addClass(_classes) %}
7+
{%- set attributes = attributes.addClass(_classes) %}
88
{% endif %}
9-
-{% set attributes = attributes.setAttribute('href', _path) %}
10-
9+
-{% set attributes = attributes.setAttribute('href', _path) -%}
10+
-
1111
-<a
1212
- {{ attributes }}
1313
->
@@ -19,6 +19,7 @@ index 171972f..aa94eb3 100644
1919
- {{ _icon_markup }}
2020
- {%- endif -%}
2121
-</a>
22+
-{#--#}
2223
+{% if _icon_markup is defined %}
2324
+ {%- set _label -%}
2425
+ {%- if _icon_position == 'before' -%}
@@ -32,5 +33,4 @@ index 171972f..aa94eb3 100644
3233
+{%- endif -%}
3334
+
3435
+{{ bcl_link(_label, _path, attributes) }}
35-
36-
{% endapply %}
36+
+{#--#}

0 commit comments

Comments
 (0)