diff --git a/src/shared/menu/helpers.ts b/src/shared/menu/helpers.ts index 2171ceec..88abb8d0 100644 --- a/src/shared/menu/helpers.ts +++ b/src/shared/menu/helpers.ts @@ -135,7 +135,7 @@ export function makeMenuLinkEntry( dom.title = title; dom.setAttribute("aria-label", title); dom.dataset.controller = "s-tooltip"; - dom.dataset.sTooltipPlacement = "bottom"; + dom.dataset.sTooltipPlacement = "top"; // create the svg svg-icon-bg element const icon = document.createElement("span"); @@ -268,7 +268,7 @@ export function makeMenuButton( button.title = title; button.setAttribute("aria-label", title); button.dataset.controller = "s-tooltip"; - button.dataset.sTooltipPlacement = "bottom"; + button.dataset.sTooltipPlacement = "top"; button.dataset.key = key; button.type = "button"; diff --git a/test/shared/menu/helpers.test.ts b/test/shared/menu/helpers.test.ts index d93783d9..03226675 100644 --- a/test/shared/menu/helpers.test.ts +++ b/test/shared/menu/helpers.test.ts @@ -20,6 +20,7 @@ describe("menu helpers", () => { expect(button.nodeName).toBe("BUTTON"); expect(button.classList).toContain(`js-${key}`); expect(button.title).toBe(title); + expect(button.dataset.sTooltipPlacement).toBe("top"); (cssClasses || []).forEach((c) => { expect(button.classList).toContain(c); }); @@ -57,6 +58,7 @@ describe("menu helpers", () => { expect(link.nodeName).toBe("A"); expect(link.target).toBe("_blank"); expect(link.href).toBe(href); + expect(link.dataset.sTooltipPlacement).toBe("top"); expect(link.classList).toContain(`js-${key}`); expect(link.children).toHaveLength(1);