diff --git a/frontend/src/components/ui/NavRail.dom.test.tsx b/frontend/src/components/ui/NavRail.dom.test.tsx index 4b359cd5..cd0b9b70 100644 --- a/frontend/src/components/ui/NavRail.dom.test.tsx +++ b/frontend/src/components/ui/NavRail.dom.test.tsx @@ -46,6 +46,22 @@ describe("NavRailItem", () => { const row = screen.getByRole("button", { name: "Alerts" }); expect(row.getAttribute("aria-current")).toBeNull(); }); + + // E28 audit: labelled, the name was the row's text, the corner badge first, so 20 unread was heard + // as "9+Alerts" where the icon-only row says "Notifications (20)". + it("labelled with a count: the visible label, then the exact count", () => { + render( + {}} + />, + ); + expect(screen.getByRole("button", { name: "Alerts (20)" })).toBeTruthy(); + }); }); // F32: the rail's footer (language, About, Sign out) drew 32 and 36 squares with 16 and 20px glyphs diff --git a/frontend/src/components/ui/NavRail.tsx b/frontend/src/components/ui/NavRail.tsx index f3c4c67b..0ce9e85d 100644 --- a/frontend/src/components/ui/NavRail.tsx +++ b/frontend/src/components/ui/NavRail.tsx @@ -97,10 +97,11 @@ export function NavRailItem({