Compare commits

..

No commits in common. "1b96b891db00e75eaadccdf68ae205514c57054d" and "6828809081c89eb4168bc8aa7e210c70a0a2c3d0" have entirely different histories.

2 changed files with 10 additions and 29 deletions

View file

@ -186,7 +186,7 @@ describe("Responsive breakpoint — the sidebar becomes a bottom tab bar under 6
cy.intercept("GET", /\/planning\?/, { statusCode: 200, body: null }); cy.intercept("GET", /\/planning\?/, { statusCode: 200, body: null });
}); });
it("renders the bottom nav instead of the sidebar, icon-only, with a working Plus tab", () => { it("renders the bottom nav instead of the sidebar, with every route tab legible and a working Plus tab", () => {
cy.setViewport("phone"); cy.setViewport("phone");
cy.visit("/"); cy.visit("/");
@ -202,15 +202,11 @@ describe("Responsive breakpoint — the sidebar becomes a bottom tab bar under 6
expect(getComputedStyle($nav[0]).position).to.equal("fixed"); expect(getComputedStyle($nav[0]).position).to.equal("fixed");
}); });
// Issue #105 — icon-only bar: each tab's `span.label` stays in the DOM // Every route tab keeps its icon *and* label legible — this bar never
// (accessible name for the link) but is visually hidden, only the icon // falls back to icon-only or horizontal scroll, unlike the old
// shows. Same treatment as the desktop collapsed rail (sidebar.cy.ts). // squashed sidebar treatment it replaces (only 4 short tabs, always
cy.contains(".app-bottom-nav a", "Planning") // fits).
.should("have.attr", "href", "/") cy.contains(".app-bottom-nav a", "Planning").find("span.label").should("be.visible");
.within(() => {
cy.get("span.label").should("exist").and("not.be.visible");
cy.get("svg").should("be.visible");
});
cy.contains(".app-bottom-nav a", "Recettes").should("have.attr", "href", "/recettes"); cy.contains(".app-bottom-nav a", "Recettes").should("have.attr", "href", "/recettes");
cy.contains(".app-bottom-nav a", "Liste de courses").should( cy.contains(".app-bottom-nav a", "Liste de courses").should(
"have.attr", "have.attr",

View file

@ -415,28 +415,13 @@
cursor: pointer; cursor: pointer;
svg { svg {
width: 1.5rem; width: 1.375rem;
height: 1.5rem; height: 1.375rem;
} }
// Icon-only bar (issue #105): the visible label is dropped. "Liste de
// courses" (16 chars) wrapped to two lines in a ~90px tab while the
// others stayed on one, so its icon+label block was taller and its
// icon sat visibly higher than the rest. Kept in the DOM, visually
// hidden the accessibility-safe way, so a screen reader still announces
// each tab by name and the `<NavLink>`/button keeps its accessible
// label (no `aria-label` to duplicate the i18n string).
.label { .label {
position: absolute; font-size: var(--font-size-xs);
width: 1px; font-weight: 600;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0 0 0 0);
clip-path: inset(50%);
white-space: nowrap;
border: 0;
} }
// Applied by NavLink itself (see AppLayout.tsx's `className` prop) for // Applied by NavLink itself (see AppLayout.tsx's `className` prop) for