Skip to content

Commit f812f20

Browse files
TonybynMp4claude
andcommitted
fix(web): screen readers hear label descriptions; cover label description mapping
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 2bacd5b commit f812f20

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

‎apps/web/src/components/pullRequest/pullRequestPresentation.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export function PullRequestLabelChip({
5656
{...(color ? { style: { "--label": color } as CSSProperties } : {})}
5757
>
5858
<span className="truncate">{label.name}</span>
59+
{label.description ? <span className="sr-only">: {label.description}</span> : null}
5960
{children}
6061
</Badge>
6162
);

‎packages/source-control-forgejo/src/server/ForgejoSourceControlProvider.test.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,10 @@ it.effect.each([
573573
updated_at: "2026-09-16T00:00:00Z",
574574
closed_at: null,
575575
merged_at: null,
576-
labels: [],
576+
labels: [
577+
{ id: 1, name: "bug", color: "ee0701", description: "Something is broken" },
578+
{ id: 2, name: "triage", color: "c5def5", description: "" },
579+
],
577580
};
578581
const requests: string[] = [];
579582
return Effect.gen(function* () {
@@ -603,6 +606,10 @@ it.effect.each([
603606
const detail = yield* provider.getChangeRequest(input);
604607
assert.strictEqual(list.items.length, 1);
605608
assert.strictEqual(detail.headSha, "head");
609+
assert.deepStrictEqual(detail.labels, [
610+
{ name: "bug", color: "ee0701", description: "Something is broken" },
611+
{ name: "triage", color: "c5def5", description: null },
612+
]);
606613
for (const result of [list.items[0]!, summary, detail]) {
607614
assert.strictEqual(result.mergeability, mergeability);
608615
assert.strictEqual(result.isDraft, isDraft);

‎packages/source-control-github/src/server/GitHubPullRequestApi.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ function searchItem(number: number, repository: string, updatedAt: string) {
472472
updatedAt,
473473
repository: { nameWithOwner: repository },
474474
reviewRequests: { nodes: [{ requestedReviewer: { __typename: "User", login: "hubot" } }] },
475-
labels: { nodes: [{ name: "bug", color: "ff0000", description: null }] },
475+
labels: { nodes: [{ name: "bug", color: "ff0000", description: "Something is broken" }] },
476476
};
477477
}
478478

@@ -1498,6 +1498,9 @@ layer("GitHubPullRequestApi.layer", (it) => {
14981498
[0, 0],
14991499
],
15001500
);
1501+
assert.deepStrictEqual(batch.items[0]?.labels, [
1502+
{ name: "bug", color: "ff0000", description: "Something is broken" },
1503+
]);
15011504
assert.isFalse(batch.truncated);
15021505
}),
15031506
);

0 commit comments

Comments
 (0)