From 81107c659e109cbc4c794edb49d302bcf5056605 Mon Sep 17 00:00:00 2001 From: Moepchi Date: Sat, 3 Oct 2026 01:50:29 +0000 Subject: [PATCH] feat: keyboard and screen-reader basics for dialogs, toolbar, and tree Dialogs move focus in on open, trap Tab, close on Escape, and return focus. Toolbar icon buttons get aria-labels; away/whisper carets expose their menu state. Channel and client rows are focusable: Enter joins/opens chat, Space selects, arrows collapse/expand, the context-menu key opens the menu with focus on its first item. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU --- ROADMAP.md | 21 ++++----- web/src/App.css | 5 +++ web/src/App.tsx | 110 ++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 105 insertions(+), 31 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 1880d5f..596db47 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -47,21 +47,16 @@ This roadmap is intentionally outcome-focused. It does not promise fixed dates. ### Accessibility -The interface currently assumes a mouse and sighted use; a real pass is -still needed: +Basics are in place: the UI language sets the document's `lang`/`dir`, +dialogs take focus on open, keep Tab inside, close on Escape, and hand focus +back; toolbar icon buttons are labelled; channel and client rows are +focusable (Enter joins a channel or opens a private chat, Space selects, +the context-menu key or Shift+F10 opens the menu with focus in it). Still to do: -- Replace clickable `
`s that aren't real ` @@ -10196,6 +10268,9 @@ function AppInner() { }} disabled={!connected} title={t("toolbar.awayOptions")} + aria-label={t("toolbar.awayOptions")} + aria-haspopup="menu" + aria-expanded={awayMenuOpen} > ▾ @@ -10245,6 +10320,9 @@ function AppInner() { onClick={() => setWhisperMenuOpen((v) => !v)} disabled={!connected} title={t("toolbar.whisper")} + aria-label={t("toolbar.whisper")} + aria-haspopup="menu" + aria-expanded={whisperMenuOpen} > 🤫 @@ -10290,13 +10368,8 @@ function AppInner() { @@ -10309,6 +10382,7 @@ function AppInner() { step={0.002} value={vadThreshold} onChange={(e) => setVadThreshold(Number(e.target.value))} + aria-label={t("toolbar.vadSensitivity")} /> @@ -10331,8 +10402,8 @@ function AppInner() { className={`ts-icon-button${tabAudioOn ? " ts-mic-on" : ""}`} onClick={handleToggleTabAudio} disabled={!micOn} - aria-pressed={tabAudioOn} title={tabAudioOn ? t("tabAudio.stop") : t("tabAudio.start")} + aria-label={tabAudioOn ? t("tabAudio.stop") : t("tabAudio.start")} > 🎵 @@ -10343,11 +10414,12 @@ function AppInner() { onClick={handleToggleOutputMuted} disabled={!connected} title={outputMuted ? t("toolbar.unmuteSound") : t("toolbar.muteSound")} + aria-label={outputMuted ? t("toolbar.unmuteSound") : t("toolbar.muteSound")} > {outputMuted ? "🔇" : "🔊"} {hasNativeOutputPicker() ? ( - ) : ( @@ -10357,6 +10429,7 @@ function AppInner() { value={outputDeviceId} onChange={(e) => handleOutputDeviceChange(e.target.value)} onFocus={refreshOutputDevices} + aria-label={t("toolbar.chooseOutputDevice")} > {outputDevices.map((d) => ( @@ -10368,7 +10441,7 @@ function AppInner() { )} {recording && ( - )} @@ -10377,6 +10450,7 @@ function AppInner() { className="ts-icon-button" onClick={() => setTheme((mode) => (mode === "dark" ? "light" : "dark"))} title={t("toolbar.toggleTheme")} + aria-label={t("toolbar.toggleTheme")} > {theme === "dark" ? "☀️" : "🌙"}