From b792483681ce5ea2c9dfcac90d8926d6b4a82c37 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Fri, 20 Nov 2026 10:16:11 +0000 Subject: [PATCH 1/3] test(web): pull request reviews and comments are headings for screen readers Fails on main: the timeline renders review verdicts and comment author lines as plain text, so heading navigation skips every comment (#39637). Co-Authored-By: Claude Opus 5.5 --- .../PullRequestTimelineTab.browser.test.tsx | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/apps/web/src/components/pullRequest/PullRequestTimelineTab.browser.test.tsx b/apps/web/src/components/pullRequest/PullRequestTimelineTab.browser.test.tsx index 847cbb60aa650..531e3bc86f4eb 100644 --- a/apps/web/src/components/pullRequest/PullRequestTimelineTab.browser.test.tsx +++ b/apps/web/src/components/pullRequest/PullRequestTimelineTab.browser.test.tsx @@ -5,6 +5,7 @@ import { type PullRequestDetailView, } from "@t3tools/contracts"; import { expect, it, vi } from "vite-plus/test"; +import { userEvent } from "vite-plus/test/browser"; import { render } from "../../../test/render"; import "../../index.css"; @@ -174,3 +175,49 @@ it.each(["review", "issue-comment", "resolved-reply"] as const)( await expect.element(screen.getByText("Linked reply", { exact: true })).toBeVisible(); }, ); + +it("gives each comment and review a heading for screen reader navigation", async () => { + const commented: PullRequestDetailView = { + ...detail, + commits: [], + comments: [ + { + id: "review", + kind: "review", + author: { login: "bob", name: null, avatarUrl: null }, + body: "Looks good", + createdAt: "2026-10-01T00:00:00Z", + url: `${detail.url}#pullrequestreview-1`, + path: null, + reviewState: "APPROVED", + }, + { + id: "comment", + kind: "issue-comment", + author: { login: "alice", name: null, avatarUrl: null }, + body: "One question", + createdAt: "2026-10-01T00:01:00Z", + url: `${detail.url}#issuecomment-2`, + path: null, + reviewState: null, + }, + ], + }; + await using screen = await render( +
+ {}} + detail={commented} + environmentId={EnvironmentId.make("environment")} + reference={detail} + order="oldest" + onOpenCommit={() => {}} + onRefresh={() => {}} + /> +
, + ); + await expect.element(screen.getByRole("heading", { name: /bob approved/i })).toBeVisible(); + await userEvent.click(screen.getByRole("button", { name: /1 comment/ })); + await expect.element(screen.getByText("One question", { exact: true })).toBeVisible(); + await expect.element(screen.getByRole("heading", { name: /alice commented/ })).toBeVisible(); +}); From d3595a96f9d281fe2721a633035453008127db5a Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Fri, 20 Nov 2026 10:22:10 +0000 Subject: [PATCH 2/3] fix(web,mobile): make comment and review author lines headings Screen reader heading navigation skipped every pull request review and comment and every issue comment, because their author lines were plain text. Render those lines as headings (h2 under the pull request title, h3 under the issue title, accessibilityRole="header" on mobile issue comments) so NVDA H, the VoiceOver rotor and TalkBack headings jump from comment to comment. Short timeline events stay plain text. Fixes pingdotgg/t3code#39637 Co-Authored-By: Claude Opus 5.5 --- .../src/features/issues/IssueRouteScreen.tsx | 2 +- .../src/components/issue/IssueDetailPanel.tsx | 36 ++++++++++--------- .../pullRequest/PullRequestSummaryTab.tsx | 4 +-- .../pullRequest/PullRequestTimelineTab.tsx | 8 ++--- 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/apps/mobile/src/features/issues/IssueRouteScreen.tsx b/apps/mobile/src/features/issues/IssueRouteScreen.tsx index 874ecfba20b6d..062b46d536df2 100644 --- a/apps/mobile/src/features/issues/IssueRouteScreen.tsx +++ b/apps/mobile/src/features/issues/IssueRouteScreen.tsx @@ -381,7 +381,7 @@ function IssueCommentCard(props: { const { comment } = props; return ( - + {comment.author?.login ?? gt("Unknown author")} diff --git a/apps/web/src/components/issue/IssueDetailPanel.tsx b/apps/web/src/components/issue/IssueDetailPanel.tsx index 6ad7cbd436546..bdee83563a330 100644 --- a/apps/web/src/components/issue/IssueDetailPanel.tsx +++ b/apps/web/src/components/issue/IssueDetailPanel.tsx @@ -828,23 +828,25 @@ export function IssueDetailPanel({ key={`c:${item.comment.id}`} className="flex flex-col gap-2 rounded-lg border border-border/60 p-3" > - - - {item.comment.url ? ( - - } - > - {formatRelativeTimeLabel(item.comment.createdAt, undefined, messages)} - - ) : ( - - {formatRelativeTimeLabel(item.comment.createdAt, undefined, messages)} - - )} - +

+ + + {item.comment.url ? ( + + } + > + {formatRelativeTimeLabel(item.comment.createdAt, undefined, messages)} + + ) : ( + + {formatRelativeTimeLabel(item.comment.createdAt, undefined, messages)} + + )} + +

+

- +

); } diff --git a/apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx b/apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx index 89a185f2ecf25..d506220187422 100644 --- a/apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx +++ b/apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx @@ -293,7 +293,7 @@ function ConversationCard({
-
+

{event.kind === "review" ? ( @@ -315,7 +315,7 @@ function ConversationCard({ )} {event.reviewState ? : null} -

+ @@ -749,7 +749,7 @@ function ReviewVerdictEvent({ />
-
+

{pullRequestReviewOutcomeStaleLabel(outcome, resolve)} -

+
From 41169490ecf015e7a87d03465981836e292f58fc Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Fri, 20 Nov 2026 10:29:09 +0000 Subject: [PATCH 3/3] fix(mobile): pull request comments and reviews are headings in the timeline Co-Authored-By: Claude Opus 5.5 --- .../mobile/src/features/pull-requests/PullRequestTimeline.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/mobile/src/features/pull-requests/PullRequestTimeline.tsx b/apps/mobile/src/features/pull-requests/PullRequestTimeline.tsx index c4068636242e5..d90366ca533a9 100644 --- a/apps/mobile/src/features/pull-requests/PullRequestTimeline.tsx +++ b/apps/mobile/src/features/pull-requests/PullRequestTimeline.tsx @@ -105,7 +105,7 @@ function TimelineComment({ icon={approved ? "checkmark" : changes ? "doc.text" : "text.bubble"} tone={approved ? "success" : changes ? "danger" : undefined} > - + @@ -275,7 +275,7 @@ export function pullRequestTimelineRows( date: thread.comments[0]?.createdAt ?? "", content: ( - +