From 33709169313d8ad11b7bf433456bfe1148098af2 Mon Sep 17 00:00:00 2001 From: Nicolas Varrot Date: Wed, 11 Feb 2026 12:17:54 +0000 Subject: [PATCH] fix: localize UI to English and add ARIA accessibility attributes - Replace all French UI strings with English (Connected, Thinking, Result, Send, etc.) - Add role="log" + aria-live="polite" to chat message area - Add role="form" + aria-label to message input area - Add aria-label to sidebar toggle, attach file, send, and textarea - Add role="banner" to header, role="navigation" to sidebar - Add role="application" to app root --- src/App.tsx | 2 +- src/components/Chat.tsx | 4 ++-- src/components/ChatInput.tsx | 11 ++++++++--- src/components/Header.tsx | 10 +++++----- src/components/Sidebar.tsx | 4 ++-- src/components/ThinkingBlock.tsx | 2 +- src/components/ToolCall.tsx | 2 +- 7 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 5b30b4a..0989bc3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,7 +9,7 @@ export default function App() { const [sidebarOpen, setSidebarOpen] = useState(false); return ( -
+
-
+
{messages.length === 0 && (
@@ -54,7 +54,7 @@ export function Chat({ messages, isGenerating, status, onSend, onAbort }: Props)
PinchChat
-
Envoie un message pour commencer
+
Send a message to get started
)} {messages.filter(hasVisibleContent).map(msg => ( diff --git a/src/components/ChatInput.tsx b/src/components/ChatInput.tsx index e68f73c..7d5a1bd 100644 --- a/src/components/ChatInput.tsx +++ b/src/components/ChatInput.tsx @@ -179,6 +179,8 @@ export function ChatInput({ onSend, onAbort, isGenerating, disabled }: Props) { return (
fileInputRef.current?.click()} disabled={disabled} className="shrink-0 h-11 w-11 rounded-2xl border border-white/8 bg-zinc-800/30 flex items-center justify-center text-zinc-400 hover:text-cyan-300 hover:bg-white/5 transition-colors disabled:opacity-30" - title="Joindre un fichier" + title="Attach file" + aria-label="Attach file" > @@ -235,7 +238,8 @@ export function ChatInput({ onSend, onAbort, isGenerating, disabled }: Props) { onChange={(e) => setText(e.target.value)} onKeyDown={handleKeyDown} onPaste={handlePaste} - placeholder="Écris un message…" + placeholder="Type a message…" + aria-label="Message" disabled={disabled} rows={1} className="flex-1 bg-transparent resize-none rounded-2xl border border-white/8 bg-zinc-900/35 px-4 py-3 text-sm text-zinc-300 placeholder:text-zinc-500 outline-none focus:ring-2 focus:ring-cyan-400/30 transition-all max-h-[200px]" @@ -252,10 +256,11 @@ export function ChatInput({ onSend, onAbort, isGenerating, disabled }: Props) { )}
diff --git a/src/components/Header.tsx b/src/components/Header.tsx index f3e34e9..7ce47cb 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -13,8 +13,8 @@ export function Header({ status, sessionKey, onToggleSidebar, activeSessionData return ( <> -
-
@@ -33,17 +33,17 @@ export function Header({ status, sessionKey, onToggleSidebar, activeSessionData {status === 'connected' ? (
- Connecté + Connected
) : status === 'connecting' ? (
- Connexion… + Connecting…
) : (
- Déconnecté + Disconnected
)}
diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index b66a37e..67a1ad6 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -13,7 +13,7 @@ export function Sidebar({ sessions, activeSession, onSwitch, open, onClose }: Pr return ( <> {open &&
} -