From 4ae36ea94fd88f87e51d582f631661a8405f1cf7 Mon Sep 17 00:00:00 2001 From: Romaric Pascal Date: Fri, 22 Sep 2023 11:14:06 +0100 Subject: [PATCH] Align how we access the menu element with the checkboxes and radios See: https://github.com/alphagov/govuk-frontend/commit/266f8772857ca9afc60ded16279ea4b2c9595462 --- .../govuk-frontend/src/govuk/components/header/header.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/govuk-frontend/src/govuk/components/header/header.mjs b/packages/govuk-frontend/src/govuk/components/header/header.mjs index 89b1325871..d068862e0b 100644 --- a/packages/govuk-frontend/src/govuk/components/header/header.mjs +++ b/packages/govuk-frontend/src/govuk/components/header/header.mjs @@ -61,8 +61,8 @@ export class Header extends GOVUKFrontendComponent { return this } - const $menu = $module.querySelector( - `#${$menuButton.getAttribute('aria-controls')}` + const $menu = document.getElementById( + $menuButton.getAttribute('aria-controls') ) if (!($menuButton instanceof HTMLElement)) {