From 42ccaf2da626e1dfa27ec43144ef1bf929bc2cd2 Mon Sep 17 00:00:00 2001 From: Molecule AI Fullstack Engineer Date: Thu, 14 May 2026 08:17:43 +0000 Subject: [PATCH] fix(canvas): add focus-visible rings to ScheduleTab, BudgetSection, ChannelsTab buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WCAG 2.1 AA: small icon buttons without borders/backgrounds are invisible when keyboard-focused. Added focus-visible:ring-2 with appropriate ring colors (accent for neutral actions, red-400 for delete) and ring-offset-1 ring-offset-zinc-900 to match the dark canvas background. Buttons updated: - ScheduleTab: Run ▶, Edit ✎, Delete ✕, toggle ○, + Add Schedule - BudgetSection: Save button - ChannelsTab: Connect/Cancel header button, Detect Chats button Refs: #986 Co-Authored-By: Claude Opus 4.7 --- canvas/src/components/tabs/BudgetSection.tsx | 2 +- canvas/src/components/tabs/ChannelsTab.tsx | 4 ++-- canvas/src/components/tabs/ScheduleTab.tsx | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/canvas/src/components/tabs/BudgetSection.tsx b/canvas/src/components/tabs/BudgetSection.tsx index f2e5d535..2cad3f95 100644 --- a/canvas/src/components/tabs/BudgetSection.tsx +++ b/canvas/src/components/tabs/BudgetSection.tsx @@ -243,7 +243,7 @@ export function BudgetSection({ workspaceId }: Props) { onClick={handleSave} disabled={saving} data-testid="budget-save-btn" - className="px-4 py-1.5 bg-accent-strong hover:bg-accent active:bg-accent-strong rounded-lg text-xs font-medium text-white disabled:opacity-50 transition-colors" + className="px-4 py-1.5 bg-accent-strong hover:bg-accent active:bg-accent-strong rounded-lg text-xs font-medium text-white disabled:opacity-50 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-zinc-900" > {saving ? "Saving…" : "Save"} diff --git a/canvas/src/components/tabs/ChannelsTab.tsx b/canvas/src/components/tabs/ChannelsTab.tsx index 676b0548..1abc1f28 100644 --- a/canvas/src/components/tabs/ChannelsTab.tsx +++ b/canvas/src/components/tabs/ChannelsTab.tsx @@ -255,7 +255,7 @@ export function ChannelsTab({ workspaceId }: Props) { @@ -308,7 +308,7 @@ export function ChannelsTab({ workspaceId }: Props) { diff --git a/canvas/src/components/tabs/ScheduleTab.tsx b/canvas/src/components/tabs/ScheduleTab.tsx index ae7ac5aa..b25fbf1d 100644 --- a/canvas/src/components/tabs/ScheduleTab.tsx +++ b/canvas/src/components/tabs/ScheduleTab.tsx @@ -194,7 +194,7 @@ export function ScheduleTab({ workspaceId }: Props) { @@ -339,7 +339,7 @@ export function ScheduleTab({ workspaceId }: Props) { ? "Last run OK — click to disable" : "Never run — click to enable" } - className={`w-2 h-2 rounded-full flex-shrink-0 ${ + className={`w-2 h-2 rounded-full flex-shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-zinc-900 ${ sched.last_status === "error" ? "bg-red-400" : sched.last_status === "ok" @@ -376,7 +376,7 @@ export function ScheduleTab({ workspaceId }: Props) {