@devries-cameron20 / t3code-1 / commits / 8238dc2652
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web,mobile): make comment and review author lines headings (#39648)

Julius Marminge committed Nov 20, 2026 at 04:10 UTC 8238dc26529b25ec0d6b9bf3409fbaea9b712527
6 files changed +75 -26
apps/mobile/src/features/issues/IssueRouteScreen.tsx
+1 -1
@@ -382,7 +382,7 @@ function IssueCommentCard(props: {
382 const { comment } = props;
383 return (
384 <View className="gap-3 rounded-2xl bg-grouped-card p-3">
385 - <View className="flex-row items-center gap-2">
385 + <View accessible accessibilityRole="header" className="flex-row items-center gap-2">
386 <PullRequestAvatar actor={comment.author} size={22} />
387 <Text className="min-w-0 flex-1 text-sm font-t3-medium" numberOfLines={1}>
388 {comment.author?.login ?? gt("Unknown author")}
apps/mobile/src/features/pull-requests/PullRequestTimeline.tsx
+2 -2
@@ -105,7 +105,7 @@ function TimelineComment({
105 icon={approved ? "checkmark" : changes ? "doc.text" : "text.bubble"}
106 tone={approved ? "success" : changes ? "danger" : undefined}
107 >
108 - <View className="flex-row items-center gap-2">
108 + <View accessible accessibilityRole="header" className="flex-row items-center gap-2">
109 <PullRequestAvatar actor={comment.author} size={22} />
110 <View className="min-w-0 flex-1">
111 <Text className="text-sm">
@@ -275,7 +275,7 @@ export function pullRequestTimelineRows(
275 date: thread.comments[0]?.createdAt ?? "",
276 content: (
277 <TimelineEvent icon="text.bubble" tone={thread.isResolved ? "success" : undefined}>
278 - <View className="flex-row items-center gap-2">
278 + <View accessible accessibilityRole="header" className="flex-row items-center gap-2">
279 <PullRequestAvatar actor={thread.comments[0]?.author ?? null} size={22} />
280 <Text className="flex-1 text-sm">
281 <T>
apps/web/src/components/issue/IssueDetailPanel.tsx
+19 -17
@@ -828,23 +828,25 @@ export function IssueDetailPanel({
828 key={`c:${item.comment.id}`}
829 className="flex flex-col gap-2 rounded-lg border border-border/60 p-3"
830 >
831 - <PullRequestMetaLine className="text-xs text-muted-foreground">
832 - <PullRequestActorLabel actor={item.comment.author} />
833 - {item.comment.url ? (
834 - <InlineButton
835 - tone="muted"
836 - render={
837 - <a href={item.comment.url} target="_blank" rel="noopener noreferrer" />
838 - }
839 - >
840 - {formatRelativeTimeLabel(item.comment.createdAt, undefined, messages)}
841 - </InlineButton>
842 - ) : (
843 - <span>
844 - {formatRelativeTimeLabel(item.comment.createdAt, undefined, messages)}
845 - </span>
846 - )}
847 - </PullRequestMetaLine>
831 + <h3>
832 + <PullRequestMetaLine className="text-xs text-muted-foreground">
833 + <PullRequestActorLabel actor={item.comment.author} />
834 + {item.comment.url ? (
835 + <InlineButton
836 + tone="muted"
837 + render={
838 + <a href={item.comment.url} target="_blank" rel="noopener noreferrer" />
839 + }
840 + >
841 + {formatRelativeTimeLabel(item.comment.createdAt, undefined, messages)}
842 + </InlineButton>
843 + ) : (
844 + <span>
845 + {formatRelativeTimeLabel(item.comment.createdAt, undefined, messages)}
846 + </span>
847 + )}
848 + </PullRequestMetaLine>
849 + </h3>
850 <PullRequestCommentBody
851 text={item.comment.body}
852 cwd={cwd}
apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx
+2 -2
@@ -122,7 +122,7 @@ function CommentIdentity({
122 ? sourceControlClients.get(detail.provider).authorProfileUrl(actor.login, detail.url)
123 : null;
124 return (
125 - <div className="flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2 gap-y-1 text-xs">
125 + <h2 className="flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2 gap-y-1 text-xs">
126 <PullRequestActorLabel actor={actor} profileUrl={profileUrl} className="max-w-full" />
127 <Tooltip>
128 <TooltipTrigger
@@ -148,7 +148,7 @@ function CommentIdentity({
148 {comment.url ? ` · ${gt("Open comment on host")}` : ""}
149 </TooltipPopup>
150 </Tooltip>
151 - </div>
151 + </h2>
152 );
153 }
154
apps/web/src/components/pullRequest/PullRequestTimelineTab.browser.test.tsx
+47
@@ -5,6 +5,7 @@ import {
5 type PullRequestDetailView,
6 } from "@t3tools/contracts";
7 import { expect, it, vi } from "vite-plus/test";
8 +import { userEvent } from "vite-plus/test/browser";
9
10 import { render } from "../../../test/render";
11 import "../../index.css";
@@ -174,3 +175,49 @@ it.each(["review", "issue-comment", "resolved-reply"] as const)(
175 await expect.element(screen.getByText("Linked reply", { exact: true })).toBeVisible();
176 },
177 );
178 +
179 +it("gives each comment and review a heading for screen reader navigation", async () => {
180 + const commented: PullRequestDetailView = {
181 + ...detail,
182 + commits: [],
183 + comments: [
184 + {
185 + id: "review",
186 + kind: "review",
187 + author: { login: "bob", name: null, avatarUrl: null },
188 + body: "Looks good",
189 + createdAt: "2026-10-01T00:00:00Z",
190 + url: `${detail.url}#pullrequestreview-1`,
191 + path: null,
192 + reviewState: "APPROVED",
193 + },
194 + {
195 + id: "comment",
196 + kind: "issue-comment",
197 + author: { login: "alice", name: null, avatarUrl: null },
198 + body: "One question",
199 + createdAt: "2026-10-01T00:01:00Z",
200 + url: `${detail.url}#issuecomment-2`,
201 + path: null,
202 + reviewState: null,
203 + },
204 + ],
205 + };
206 + await using screen = await render(
207 + <div style={{ height: 600 }}>
208 + <PullRequestTimelineTab
209 + scrollerRef={() => {}}
210 + detail={commented}
211 + environmentId={EnvironmentId.make("environment")}
212 + reference={detail}
213 + order="oldest"
214 + onOpenCommit={() => {}}
215 + onRefresh={() => {}}
216 + />
217 + </div>,
218 + );
219 + await expect.element(screen.getByRole("heading", { name: /bob approved/i })).toBeVisible();
220 + await userEvent.click(screen.getByRole("button", { name: /1 comment/ }));
221 + await expect.element(screen.getByText("One question", { exact: true })).toBeVisible();
222 + await expect.element(screen.getByRole("heading", { name: /alice commented/ })).toBeVisible();
223 +});
apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx
+4 -4
@@ -293,7 +293,7 @@ function ConversationCard({
293 <div className="px-2">
294 <div className="flex min-w-0 flex-wrap items-center gap-2">
295 <div className="min-w-0 flex-1">
296 - <div className="flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1 text-xs">
296 + <h2 className="flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1 text-xs">
297 {event.kind === "review" ? (
298 <T>
299 <Var>
@@ -315,7 +315,7 @@ function ConversationCard({
315 </>
316 )}
317 {event.reviewState ? <ReviewStateBadge state={event.reviewState} /> : null}
318 - </div>
318 + </h2>
319 <PullRequestMetaLine className="mt-1 flex-wrap text-2xs text-muted-foreground">
320 <span>
321 <RelativeTime timestamp={event.at} />
@@ -749,7 +749,7 @@ function ReviewVerdictEvent({
749 />
750 <div className="flex min-w-0 flex-wrap items-center gap-2 py-1.5">
751 <div className="min-w-0 flex-1">
752 - <div className="flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1 text-xs">
752 + <h2 className="flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1 text-xs">
753 <ActorName actor={event.actor} />
754 <Tooltip disabled={!stale}>
755 <TooltipTrigger
@@ -775,7 +775,7 @@ function ReviewVerdictEvent({
775 </TooltipTrigger>
776 <TooltipPopup>{pullRequestReviewOutcomeStaleLabel(outcome, resolve)}</TooltipPopup>
777 </Tooltip>
778 - </div>
778 + </h2>
779 <div className="mt-0.5 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1">
780 <PullRequestMetaLine className="flex-wrap text-2xs text-muted-foreground">
781 <span>