From d86cbfebfa1823fd2406e75cd6326c3361700384 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Wed, 16 Sep 2026 13:28:18 -0700 Subject: [PATCH] fix(native-chat): give the reconnect row's provider icon an accessible name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every row rendered the provider as a bare AgentIcon, whose svg carries no aria-label, title or alt. With a Claude chat and a Codex chat in one worktree the two rows were identical to any non-visual consumer, and the dialog offered several identically-named "Reconnect" buttons with nothing to tell them apart. A regression from 233e37b2bd, where the row read `${agent} · ${workspace} · …` as text. Moving the workspace name into the group heading was right; dropping the provider to an unlabelled glyph is what lost the information. AgentIcon takes no label prop, so the icon is wrapped the way NativeChatSupportedAgents already names it: a span with role="img" and an aria-label from formatAgentTypeLabel, the same labeller the sidebar and dashboard rows use. The per-row button also names its agent now ("Reconnect Claude chat"). The identical buttons were half the reported harm, and an accessible name that opens with the visible word keeps WCAG 2.5.3 satisfied. Say so if you would rather ship only the icon label -- it is one attribute and one catalog key to drop. Age code untouched, as asked: formatShortTimeAgo still takes (timestamp, now) and is still called with (recordedAt, listedAt). --- .../NativeChatResumeOnRestartGroups.tsx | 24 ++++++++++++++++--- src/renderer/src/i18n/locales/en.json | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/NativeChatResumeOnRestartGroups.tsx b/src/renderer/src/components/NativeChatResumeOnRestartGroups.tsx index f33c1a730f5..6aa64946a02 100644 --- a/src/renderer/src/components/NativeChatResumeOnRestartGroups.tsx +++ b/src/renderer/src/components/NativeChatResumeOnRestartGroups.tsx @@ -3,7 +3,7 @@ import { Button } from './ui/button' import { RepoIconGlyph } from '@/components/repo/repo-icon' import { CompactAgentExpansion } from '@/components/sidebar/worktree-card-compact-agents' import { AgentIcon } from '@/lib/agent-catalog' -import { agentTypeToIconAgent } from '@/lib/agent-status' +import { agentTypeToIconAgent, formatAgentTypeLabel } from '@/lib/agent-status' import { formatShortTimeAgo } from '@/lib/short-time-ago' import { translate } from '@/i18n/i18n' import { useAppStore } from '../store' @@ -69,9 +69,14 @@ function ResumeCandidateRow({ busy: boolean onReconnect: () => void }): React.JSX.Element { + const agentLabel = formatAgentTypeLabel(candidate.agent) return (
{candidate.latestPrompt.trim() || @@ -82,7 +87,20 @@ function ResumeCandidateRow({ {formatShortTimeAgo(candidate.recordedAt, listedAt)} -