Skip to content

Commit 4588fb9

Browse files
committed
WD-30045 - Fix Copilot comments
1 parent a25589c commit 4588fb9

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

static/js/base/navigation/globalNav.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export function patchAllCanonicalMobileMarkup() {
55
);
66

77
topMobileSections?.forEach((section: Element) => {
8-
const sectionButton = section.querySelector("button");
9-
const sectionHref = sectionButton?.getAttribute("href");
8+
const sectionLink = section.querySelector("a.p-navigation__link");
9+
const sectionHref = sectionLink?.getAttribute("href");
1010

1111
const sectionLinksList = section.querySelector("ul");
1212
sectionLinksList?.setAttribute("aria-hidden", "true");
@@ -28,8 +28,8 @@ function createBackButtonItem(href: string) {
2828
// remove the # from the href
2929
const ariaControls = href.slice(1);
3030
return createFromHTML(`<li class="p-navigation__item--dropdown-close">
31-
<button href=${href} aria-controls=${ariaControls} class="p-navigation__link js-back-button">
31+
<a href=${href} aria-controls=${ariaControls} class="p-navigation__link js-back-button">
3232
Back
33-
</button>
33+
</a>
3434
</li>`);
3535
}

static/js/base/navigation/listeners.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,9 @@ export const initNavigationListeners = () => {
164164

165165
if (target.getAttribute("aria-hidden") === "true") {
166166
unfocusAllLinks();
167-
console.log(toggle.parentElement?.classList);
168167
expandDropdown(toggle, target);
169168
navigation.classList.add("has-menu-open");
170169
} else {
171-
console.log(toggle.parentElement?.classList);
172170
collapseDropdown(toggle, target);
173171
if (!isNested) {
174172
closeMenu();

static/sass/_snapcraft_p-navigation.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
syntax: "<percentage>";
7373
}
7474

75-
.p-navigation__nav--wrapper{
75+
.p-navigation__nav--wrapper {
7676
display: flex;
7777
flex-direction: row;
7878
justify-content: space-between;

0 commit comments

Comments
 (0)