fix(a11y): a video card's thumbnail link is named by the title, not the duration badge (E28 S3d4)

Its only text was the duration, so every card's first Tab stop was announced as "44:10".
This commit is contained in:
2026-09-26 00:39:10 +02:00
parent 4d6e59b80a
commit bfc6d199c0
2 changed files with 14 additions and 0 deletions
@@ -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();
});
});