From 2a23f089cb105691b93a31f9464c6b9adbb6c245 Mon Sep 17 00:00:00 2001 From: Nicolas Varrot Date: Sat, 21 Feb 2026 09:03:45 +0000 Subject: [PATCH] fix: add missing aria-labels to icon-only buttons for accessibility - ChatInput: add aria-labels to remove file, send shortcut toggle, and stop buttons - CodeBlock: add aria-labels to word wrap, line numbers, and collapse/expand buttons - Header: add aria-labels to session info, copy, close, and compact buttons --- src/components/ChatInput.tsx | 3 +++ src/components/CodeBlock.tsx | 3 +++ src/components/Header.tsx | 6 ++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/ChatInput.tsx b/src/components/ChatInput.tsx index 5a302cd..50196c1 100644 --- a/src/components/ChatInput.tsx +++ b/src/components/ChatInput.tsx @@ -296,6 +296,7 @@ export function ChatInput({ onSend, onAbort, isGenerating, disabled, sessionKey, @@ -360,6 +361,7 @@ export function ChatInput({ onSend, onAbort, isGenerating, disabled, sessionKey, onClick={toggleSendShortcut} className="hidden sm:flex shrink-0 h-7 rounded-xl border border-pc-border bg-pc-elevated/30 px-2 items-center gap-1 text-[10px] text-pc-text-muted hover:text-pc-text-secondary hover:bg-[var(--pc-hover)] transition-colors" title={`${t('settings.sendShortcut')}: ${sendOnEnter ? t('settings.sendEnter') : t('settings.sendCtrlEnter')}`} + aria-label={`${t('settings.sendShortcut')}: ${sendOnEnter ? t('settings.sendEnter') : t('settings.sendCtrlEnter')}`} > {sendOnEnter ? '↵' : (navigator.userAgent.includes('Mac') ? '⌘↵' : 'Ctrl↵')} @@ -367,6 +369,7 @@ export function ChatInput({ onSend, onAbort, isGenerating, disabled, sessionKey,
PinchChat { const img = e.target as HTMLImageElement; if (img.src !== window.location.origin + '/logo.png') { img.src = '/logo.png'; } else { img.style.display = 'none'; } }} /> - @@ -206,7 +207,7 @@ const SessionInfoPopover = forwardRef
{t('header.sessionInfo')} - +
{rows.map(({ label, value, copyable }) => ( @@ -241,6 +242,7 @@ function CompactButton({ sessionKey, onCompact }: { sessionKey: string; onCompac disabled={compacting} className="inline-flex items-center gap-1 text-[10px] text-pc-text-muted hover:text-pc-text shrink-0 px-1.5 py-0.5 rounded hover:bg-[var(--pc-hover)] transition-colors disabled:opacity-50" title={t('header.compact')} + aria-label={t('header.compact')} > {compacting ? t('header.compacting') : t('header.compact')}