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 (
  • - + {/* AgentIcon carries no label of its own, so the provider was invisible to assistive tech and + two rows in one worktree read identically. Named the way NativeChatSupportedAgents does. */} + + +

    {candidate.latestPrompt.trim() || @@ -82,7 +87,20 @@ function ResumeCandidateRow({ {formatShortTimeAgo(candidate.recordedAt, listedAt)} - diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index 84c8b41a744..adc91ef3c82 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -1925,6 +1925,7 @@ "updateBody": "These chats were mid-turn when Orca installed an update. Reconnecting restores each one where it stopped, with its full context and without re-sending your prompt — the interrupted reply will not continue on its own.", "terminalSessionsUnaffected": "Only chats are affected — your terminal sessions kept running and need nothing from you.", "resume": "Reconnect", + "reconnectAgent": "Reconnect {{value0}} chat", "resumeAll": "Reconnect all", "resuming": "Reconnecting…", "notNow": "Not now",