diff --git a/packages/web-components/src/components/masthead/megamenu-top-nav-menu.ts b/packages/web-components/src/components/masthead/megamenu-top-nav-menu.ts index e11b3c20a9d..402b401200f 100644 --- a/packages/web-components/src/components/masthead/megamenu-top-nav-menu.ts +++ b/packages/web-components/src/components/masthead/megamenu-top-nav-menu.ts @@ -7,7 +7,7 @@ * LICENSE file in the root directory of this source tree. */ -import { customElement } from 'lit-element'; +import { customElement, query } from 'lit-element'; import settings from 'carbon-components/es/globals/js/settings'; import ddsSettings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js'; import { forEach } from '../../globals/internal/collection-helpers'; @@ -25,6 +25,12 @@ const { stablePrefix: ddsPrefix } = ddsSettings; */ @customElement(`${ddsPrefix}-megamenu-top-nav-menu`) class DDSMegaMenuTopNavMenu extends DDSTopNavMenu { + /** + * The menu ul node. + */ + @query(`.${prefix}--header__menu`) + private _menuNode!: HTMLElement; + /** * The observer for the resize of the viewport. */ @@ -71,6 +77,7 @@ class DDSMegaMenuTopNavMenu extends DDSTopNavMenu { } firstUpdated() { + this._menuNode.removeAttribute('role'); this._cleanAndCreateObserverResize({ create: true }); }