From 1e58a6a8f6d1a1c92ebe40ec91895866db41f163 Mon Sep 17 00:00:00 2001 From: LarisaStar <61147963+Larisa-Staroverova@users.noreply.github.com> Date: Wed, 9 Oct 2024 12:47:41 +0200 Subject: [PATCH] fix: Focus after clicking on hamburger menu (#19366) Closes CXSPA-8585 --- projects/storefrontlib/layout/main/storefront.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/storefrontlib/layout/main/storefront.component.ts b/projects/storefrontlib/layout/main/storefront.component.ts index e2943ef9967..8bd99b7b6ae 100644 --- a/projects/storefrontlib/layout/main/storefront.component.ts +++ b/projects/storefrontlib/layout/main/storefront.component.ts @@ -120,8 +120,9 @@ export class StorefrontComponent implements OnInit, OnDestroy { } protected focusOnFirstNavigationItem() { - const closestNavigationUi = - this.elementRef.nativeElement.querySelector('cx-navigation-ui'); + const closestNavigationUi = this.elementRef.nativeElement.querySelector( + 'header cx-navigation-ui' + ); const focusable = closestNavigationUi?.querySelector( 'li:not(.back) button, [tabindex="0"]' );