diff --git a/templates/patterns/navigation_menu/pattern-navigation-menu.html.twig b/templates/patterns/navigation_menu/pattern-navigation-menu.html.twig index c66559358..e9d35a691 100644 --- a/templates/patterns/navigation_menu/pattern-navigation-menu.html.twig +++ b/templates/patterns/navigation_menu/pattern-navigation-menu.html.twig @@ -63,10 +63,7 @@ {% include '@ecl-twig/menu' with { title: label|default('Menu'|t), toggle: { - link: { - label: label|default('Menu'|t), - hide_label: true - }, + label: label|default('Menu'|t), icon: { path: ecl_icon_path, name: 'hamburger', diff --git a/tests/src/Functional/SiteHeaderTest.php b/tests/src/Functional/SiteHeaderTest.php index 2f7cda6c3..a62a8b232 100644 --- a/tests/src/Functional/SiteHeaderTest.php +++ b/tests/src/Functional/SiteHeaderTest.php @@ -246,9 +246,9 @@ public function testSiteHeader(): void { // Assert the menu container. $menu_container = $assert->elementExists('css', 'nav div.ecl-container.ecl-menu__container', $main_menu); - $this->assertStringContainsString('Menu', $menu_container->find('css', "a.ecl-link.ecl-link--standalone.ecl-menu__open[href][data-ecl-menu-open] span.ecl-link__label") + $this->assertStringContainsString('Menu', $menu_container->find('css', "button.ecl-button--tertiary.ecl-menu__open.ecl-button--icon-only[data-ecl-menu-open] span.ecl-button__label") ->getText()); - $icon = $menu_container->find('css', "a.ecl-menu__open svg.ecl-icon.ecl-icon--m[focusable='false'][aria-hidden='true']"); + $icon = $menu_container->find('css', "button.ecl-menu__open svg.ecl-icon.ecl-icon--m[focusable='false'][aria-hidden='true']"); $this->assertEquals('', $icon->getHtml()); $assert->elementExists('css', "section.ecl-menu__inner[data-ecl-menu-inner]", $menu_container); $assert->elementExists('css', 'section header.ecl-menu__inner-header', $menu_container); diff --git a/tests/src/Kernel/fixtures/rendering.yml b/tests/src/Kernel/fixtures/rendering.yml index 103d70351..aa023ef3f 100644 --- a/tests/src/Kernel/fixtures/rendering.yml +++ b/tests/src/Kernel/fixtures/rendering.yml @@ -3433,9 +3433,9 @@ "li.ecl-menu__item:nth-child(1) button[aria-label=\"Access item's children\"]": 1 "li.ecl-menu__item:nth-child(2) button[aria-label=\"Access item's children\"]": 1 "div.ecl-container.ecl-menu__container section.ecl-menu__inner[data-ecl-menu-inner]": 1 - "a.ecl-link--standalone.ecl-button.ecl-button--tertiary.ecl-menu__open.ecl-link--icon-only": 1 + "button.ecl-button--tertiary.ecl-menu__open.ecl-button--icon-only": 1 equals: - 'a.ecl-menu__open.ecl-link--icon-only span.ecl-link__label': 'Menu' + 'button.ecl-menu__open.ecl-button--icon-only span.ecl-button__label': 'Menu' '.ecl-menu__inner-header button.ecl-menu__close[data-ecl-menu-close] span.ecl-button__label': "Close" '.ecl-menu__inner-header button.ecl-menu__back[data-ecl-menu-back] .ecl-button__label': "Back" 'li.ecl-menu__item.ecl-menu__item--has-children:nth-child(1) a.ecl-menu__link': "Parent 1" @@ -3485,7 +3485,7 @@ "nav.ecl-menu[data-ecl-menu][data-ecl-menu-max-lines=\"3\"][data-ecl-auto-init=\"Menu\"][aria-expanded=\"false\"][role=\"navigation\"][aria-label=\"Site navigation\"]": 1 "li.ecl-menu__item:nth-child(1) button[aria-label=\"Access item's children\"]": 1 equals: - '.ecl-menu__open .ecl-link__label': "Custom Menu" + 'button.ecl-menu__open span.ecl-button__label': "Custom Menu" '.ecl-menu__inner-header button.ecl-menu__close[data-ecl-menu-close] span.ecl-button__label': "Close" '.ecl-menu__inner-header button.ecl-menu__back[data-ecl-menu-back] .ecl-button__label': "Back" 'li.ecl-menu__item:nth-child(1) a.ecl-menu__link': "Parent 1"