The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 08:30 UTC
fix(web): screen readers name thread details issue and PR rows by number and title (#38160)
Julius Marminge committed
Nov 17, 2026 at 06:58 UTC
0c676d95b1eb60525ca3e36e085d06a1302bf0df
4 files changed
+75
-8
apps/web/src/components/chat/ThreadDetailsIssueRows.tsx
+1
-1
@@ -29,7 +29,7 @@ export function ThreadDetailsIssueRows({
29
<ThreadDetailsControl
30
key={threadIssueKeyOf(link)}
31
part="row"
32
- aria-label={link.url}
32
+ aria-label={`Issue ${link.displayKey}: ${link.title}`}
33
onClick={(event) => onOpenLink(event, link)}
34
>
35
<IssueGlyph.issue aria-hidden className={THREAD_DETAILS_PANEL_ICON_CLASS} />
apps/web/src/components/chat/ThreadDetailsPrRow.browser.test.tsx
+65
-3
@@ -1,5 +1,6 @@
1
import {
2
EnvironmentId,
3
+ IssueTrackerKind,
4
ProjectId,
5
SourceControlProviderKind,
6
ThreadId,
@@ -119,6 +120,7 @@ import { act, render as renderUi } from "../../../test/render";
120
import { useComposerDraftStore } from "~/composerDraftStore";
121
import { useUiStateStore } from "~/uiStateStore";
122
import { ThreadDetailsPrRow } from "./ThreadDetailsPrRow";
123
+import { ThreadDetailsIssueRows } from "./ThreadDetailsIssueRows";
124
import { ThreadDetailsThreadPrRows } from "./ThreadDetailsPrRows";
125
126
const threadRef: ScopedThreadRef = {
@@ -173,7 +175,6 @@ it("merges with the last selected merge method", async () => {
175
status={null}
176
project={null}
177
label="Test PR"
176
- openAriaLabel="Open PR"
178
onOpen={vi.fn()}
179
/>,
180
);
@@ -202,7 +203,6 @@ it("requires a new merge click after passing checks become pending and pass agai
203
status={null}
204
project={null}
205
label="Test PR"
205
- openAriaLabel="Open PR"
206
onOpen={vi.fn()}
207
/>
208
);
@@ -266,7 +266,6 @@ it("adds the failing checks to a given composer instead of opening a new thread"
266
status={null}
267
project={null}
268
label="Test PR"
269
- openAriaLabel="Open PR"
269
onOpen={vi.fn()}
270
composerTarget={threadRef}
271
/>,
@@ -333,3 +332,66 @@ it.each([
332
`using ${expected}`,
333
);
334
});
335
+
336
+it("names a linked pull request row by its kind, number and title, not its URL", async () => {
337
+ await using screen = await setup();
338
+ state.projects = [repositoryProject];
339
+ state.pullRequests = [
340
+ {
341
+ host: "github.com",
342
+ repository: "owner/repo",
343
+ number: 1,
344
+ url: "https://github.com/owner/repo/pull/1",
345
+ source: "manual",
346
+ linkedAt: "2026-10-30T00:00:00.000Z",
347
+ snapshot: null,
348
+ stack: null,
349
+ },
350
+ ];
351
+ await act(async () => {
352
+ await screen.rerender(
353
+ <ThreadDetailsThreadPrRows threadRef={threadRef} project={repositoryProject as never} />,
354
+ );
355
+ });
356
+ const row = [...screen.container.querySelectorAll("button")].find((button) =>
357
+ button.textContent?.includes("Test PR"),
358
+ )!;
359
+ const name = row.getAttribute("aria-label") ?? row.textContent ?? "";
360
+ expect(name).not.toContain("https://");
361
+ expect(name).toMatch(/pull request/i);
362
+ expect(name).toContain("#1");
363
+ expect(name).toContain("Test PR");
364
+});
365
+
366
+it("names a linked issue row by its kind, number and title, not its URL", async () => {
367
+ await using screen = await setup();
368
+ await act(async () => {
369
+ await screen.rerender(
370
+ <ThreadDetailsIssueRows
371
+ links={[
372
+ {
373
+ tracker: IssueTrackerKind.make("github"),
374
+ host: "github.com",
375
+ scope: "owner/repo",
376
+ key: "123",
377
+ projectId: ProjectId.make("repository"),
378
+ url: "https://github.com/owner/repo/issues/123",
379
+ source: "manual",
380
+ linkedAt: "2026-10-30T00:00:00.000Z",
381
+ displayKey: "#123",
382
+ title: "Sidebar flickers on resize",
383
+ },
384
+ ]}
385
+ onOpenLink={vi.fn()}
386
+ />,
387
+ );
388
+ });
389
+ const row = [...screen.container.querySelectorAll("button")].find((button) =>
390
+ button.textContent?.includes("Sidebar flickers on resize"),
391
+ )!;
392
+ const name = row.getAttribute("aria-label") ?? row.textContent ?? "";
393
+ expect(name).not.toContain("https://");
394
+ expect(name).toMatch(/issue/i);
395
+ expect(name).toContain("#123");
396
+ expect(name).toContain("Sidebar flickers on resize");
397
+});
apps/web/src/components/chat/ThreadDetailsPrRow.tsx
+9
-2
@@ -94,7 +94,6 @@ export function ThreadDetailsPrRow({
94
status,
95
project,
96
label,
97
- openAriaLabel,
97
onOpen,
98
onActed,
99
onStopWatching,
@@ -107,7 +106,6 @@ export function ThreadDetailsPrRow({
106
status: PrStatusIndicator | null;
107
project: EnvironmentProject | null;
108
label: string;
110
- openAriaLabel: string;
109
onOpen: (event: ReactMouseEvent<HTMLElement>) => void;
110
onActed?: () => void;
111
onStopWatching?: (() => void) | undefined;
@@ -265,6 +263,15 @@ export function ThreadDetailsPrRow({
263
<PullRequestGlyph.pullRequest className={THREAD_DETAILS_PANEL_ICON_CLASS} />
264
);
265
266
+ const stateLabel = (
267
+ statePresentation ??
268
+ (pr ? resolvePullRequestState({ state: pr.state, isDraft: pr.isDraft === true }) : null)
269
+ )?.label.toLowerCase();
270
+ const title = (detail?.title ?? pr?.title)?.trim();
271
+ const openAriaLabel = `${capitalizeTerm(terminology.singular)} #${number}${
272
+ stateLabel ? `, ${stateLabel}` : ""
273
+ }${title ? `: ${title}` : ""}`;
274
+
275
const rowTooltip =
276
detail === null || statePresentation === null ? (
277
<TooltipPopup side="top">
apps/web/src/components/chat/ThreadDetailsPrRows.tsx
-2
@@ -71,7 +71,6 @@ function ThreadDetailsPrLinkRow({
71
status={prStatusIndicator(pr, linked?.sourceControlProvider)}
72
project={project}
73
label={`#${link.number}${link.snapshot === null ? "" : `: ${link.snapshot.title}`}`}
74
- openAriaLabel={link.url}
74
onOpen={onOpen}
75
onStopWatching={onStopWatching}
76
composerTarget={composerTarget}
@@ -207,7 +206,6 @@ export function ThreadDetailsThreadPrRows({
206
status={displayed.status}
207
project={rowProject}
208
label={`#${number}${pr?.title.trim() ? `: ${pr.title}` : ""}`}
210
- openAriaLabel={url}
209
onOpen={(event) => openPrLink(event, url)}
210
composerTarget={composerTarget}
211
{...(onActed ? { onActed } : {})}