Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(left-nav): change element order #3996

Merged
merged 2 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,15 @@ class DDSMastheadComposite extends LitElement {
const authenticated = userStatus === USER_AUTHENTICATION_STATUS.AUTHENTICATED;
const profileItems = authenticated ? authenticatedProfileItems : unauthenticatedProfileItems;
return html`
<dds-left-nav-overlay></dds-left-nav-overlay>
<dds-left-nav>
${!brandName
? undefined
: html`
<dds-left-nav-name>${brandName}</dds-left-nav-name>
`}
${this._renderNavItems({ target: NAV_ITEMS_RENDER_TARGET.LEFT_NAV })}
</dds-left-nav>
<dds-masthead aria-label="${ifNonNull(mastheadAssistiveText)}">
<dds-masthead-menu-button
button-label-active="${ifNonNull(menuButtonAssistiveTextActive)}"
Expand Down Expand Up @@ -312,15 +321,6 @@ class DDSMastheadComposite extends LitElement {
</dds-masthead-profile>
</dds-masthead-global-bar>
</dds-masthead>
<dds-left-nav-overlay></dds-left-nav-overlay>
<dds-left-nav>
${!brandName
? undefined
: html`
<dds-left-nav-name>${brandName}</dds-left-nav-name>
`}
${this._renderNavItems({ target: NAV_ITEMS_RENDER_TARGET.LEFT_NAV })}
</dds-left-nav>
`;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,31 @@ class DDSMastheadMenuButton extends HostListenerMixin(BXHeaderMenuButton) {
}

render() {
const { _hasSearchActive: hasSearchActive } = this;
const { active, _hasSearchActive: hasSearchActive } = this;
const classes = classMap({
[`${ddsPrefix}-ce--header__menu-trigger__container`]: true,
[`${ddsPrefix}-ce--header__menu-trigger__container--has-search-active`]: hasSearchActive,
});
const sentinelTabIndex = !active ? -1 : 0;
return html`
<div class="${classes}">
<a id="start-sentinel" class="${prefix}--visually-hidden" href="javascript:void 0" role="navigation"> </a>
<a
id="start-sentinel"
tabindex="${sentinelTabIndex}"
class="${prefix}--visually-hidden"
href="javascript:void 0"
role="navigation"
>
</a>
${super.render()}
<a id="end-sentinel" class="${prefix}--visually-hidden" href="javascript:void 0" role="navigation"> </a>
<a
id="end-sentinel"
tabindex="${sentinelTabIndex}"
class="${prefix}--visually-hidden"
href="javascript:void 0"
role="navigation"
>
</a>
</div>
`;
}
Expand Down