From ad8b42977f9e8cf585e685ba235b96c410461329 Mon Sep 17 00:00:00 2001 From: Molecule AI Core-UIUX Date: Thu, 14 May 2026 08:01:33 +0000 Subject: [PATCH] =?UTF-8?q?fix(canvas):=20add=20focus-visible=20rings=20to?= =?UTF-8?q?=20icon/text=20buttons=20=E2=80=94=20WCAG=202.1=20AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three keyboard-inaccessible buttons found during WCAG round 5 audit: - ScheduleTab: ▶/✎/✕ action buttons + toggle dot had no focus ring - BudgetSection: Save button missing focus ring - ChannelsTab: + Connect/Cancel button missing focus ring Small icon buttons without borders/backgrounds are invisible when keyboard-focused without an explicit ring. Added focus-visible:ring-2 with appropriate ring-offset colors to match the dark zinc-900 canvas. Co-Authored-By: Claude Opus 4.7 --- canvas/src/components/tabs/BudgetSection.tsx | 2 +- canvas/src/components/tabs/ChannelsTab.tsx | 2 +- canvas/src/components/tabs/ScheduleTab.tsx | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/canvas/src/components/tabs/BudgetSection.tsx b/canvas/src/components/tabs/BudgetSection.tsx index f2e5d535..9c07c266 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-surface" > {saving ? "Saving…" : "Save"} diff --git a/canvas/src/components/tabs/ChannelsTab.tsx b/canvas/src/components/tabs/ChannelsTab.tsx index 676b0548..07bfce3d 100644 --- a/canvas/src/components/tabs/ChannelsTab.tsx +++ b/canvas/src/components/tabs/ChannelsTab.tsx @@ -255,7 +255,7 @@ export function ChannelsTab({ workspaceId }: Props) { diff --git a/canvas/src/components/tabs/ScheduleTab.tsx b/canvas/src/components/tabs/ScheduleTab.tsx index ae7ac5aa..1dfce18f 100644 --- a/canvas/src/components/tabs/ScheduleTab.tsx +++ b/canvas/src/components/tabs/ScheduleTab.tsx @@ -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) {