From 14a4004fd6ec3882c35fbb5acfbd9441af7a3d97 Mon Sep 17 00:00:00 2001
From: Mathieu Piton <27002047+mpiton@users.noreply.github.com>
Date: Sun, 12 Apr 2026 18:31:33 +0200
Subject: [PATCH] fix(a11y): use a single h1 on overview
---
src/App.test.tsx | 11 +++++++++++
src/components/Overview/Overview.test.tsx | 14 ++++++++++++++
src/components/Overview/Overview.tsx | 2 +-
3 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/src/App.test.tsx b/src/App.test.tsx
index 5edf7d8..464313d 100644
--- a/src/App.test.tsx
+++ b/src/App.test.tsx
@@ -75,6 +75,17 @@ describe("App layout", () => {
expect(await screen.findByTestId("overview")).toBeInTheDocument();
});
+ it("should expose a single level-one heading on the overview screen", async () => {
+ renderApp();
+
+ expect(await screen.findByTestId("overview")).toBeInTheDocument();
+ expect(screen.getAllByRole("heading", { level: 1 })).toHaveLength(1);
+ expect(screen.getByRole("heading", { level: 1, name: "PRism" })).toBeInTheDocument();
+ expect(
+ screen.getByRole("heading", { level: 2, name: "Review requests come first" }),
+ ).toBeInTheDocument();
+ });
+
it("should render my-prs view", async () => {
useDashboardStore.setState({ currentView: "mine" });
renderApp();
diff --git a/src/components/Overview/Overview.test.tsx b/src/components/Overview/Overview.test.tsx
index 9599dc6..50ecbb0 100644
--- a/src/components/Overview/Overview.test.tsx
+++ b/src/components/Overview/Overview.test.tsx
@@ -158,6 +158,20 @@ describe("Overview", () => {
expect(screen.getByText("PR #2")).toBeInTheDocument();
});
+ it("should use a level-two heading for the priority lane title", () => {
+ setupMock(
+ makeDashboard({
+ reviewRequests: [makePr(1)],
+ }),
+ );
+
+ renderWithProviders(
Priority lane
-Surface the PRs that need your attention now so approvals and requested changes do not get buried under passive updates.