diff --git a/frontend/src/components/VideoCard.nav.dom.test.tsx b/frontend/src/components/VideoCard.nav.dom.test.tsx index 2121cc3c..74b3976b 100644 --- a/frontend/src/components/VideoCard.nav.dom.test.tsx +++ b/frontend/src/components/VideoCard.nav.dom.test.tsx @@ -87,3 +87,14 @@ describe("VideoCard — keyboard navigation hooks", () => { expect(screen.getByTestId("video-card").hasAttribute("data-nav-index")).toBe(false); }); }); + +// E28 S3d4: the thumbnail link's only text is the duration badge, so each card's first Tab stop was +// announced as "20:00". It is named by the title, like the title link beside it. +describe("VideoCard — the thumbnail link", () => { + it("is named by the video's title, not its duration", () => { + renderCard("cards"); + const links = screen.getAllByRole("link", { name: "Cicada 3301" }); + expect(links.length).toBeGreaterThanOrEqual(2); + expect(screen.queryByRole("link", { name: "20:00" })).toBeNull(); + }); +}); diff --git a/frontend/src/components/VideoCard.tsx b/frontend/src/components/VideoCard.tsx index 2260ad72..9f0eea32 100644 --- a/frontend/src/components/VideoCard.tsx +++ b/frontend/src/components/VideoCard.tsx @@ -223,10 +223,13 @@ function Thumb({ }; return ( + // Named by the title: its only text is the duration badge, so a screen reader heard the first Tab + // stop of every card as "44:10" (E28 S3d4). openInApp(e, video, onOpen)} className={clsx( "block relative rounded-xl overflow-hidden bg-surface border border-border shadow-md group-hover:shadow-2xl transition-shadow",