From 1126d7b66ddcfbcb59752e499a596b05d2a4098a Mon Sep 17 00:00:00 2001 From: Molecule AI Core-UIUX Date: Fri, 24 Apr 2026 14:41:35 +0000 Subject: [PATCH] fix(canvas/a11y): add type=button to tab toolbar and settings buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WCAG 4.1.2 / bug #1669 follow-up — fixing remaining buttons missing type="button" across tab components and settings. Files changed: - FilesTab/FilesToolbar.tsx (5 buttons): +New, Upload, Export, Clear, ↻ (all had onClick, no type=button) - config/secrets-section.tsx (7 buttons): Remove, Edit/Update/Cancel across 2 SecretRow variants + add-variable form - config/form-inputs.tsx (2 buttons): tag remove ×, section collapse toggle - ActivityTab.tsx (1 button): row expand toggle - TracesTab.tsx (1 button): Refresh - settings/UnsavedChangesGuard.tsx (2 buttons): Keep editing, Discard (Radix AlertDialog asChild wrappers — type=button prevents form submit) Total: 18 buttons fixed across 6 files. 934/934 tests pass. Co-Authored-By: Claude Sonnet 4.6 --- .../settings/UnsavedChangesGuard.tsx | 4 ++-- canvas/src/components/tabs/ActivityTab.tsx | 2 +- .../components/tabs/FilesTab/FilesToolbar.tsx | 10 +++++----- canvas/src/components/tabs/TracesTab.tsx | 2 +- .../src/components/tabs/config/form-inputs.tsx | 4 ++-- .../components/tabs/config/secrets-section.tsx | 18 +++++++++--------- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/canvas/src/components/settings/UnsavedChangesGuard.tsx b/canvas/src/components/settings/UnsavedChangesGuard.tsx index 373716a3..d9b198d1 100644 --- a/canvas/src/components/settings/UnsavedChangesGuard.tsx +++ b/canvas/src/components/settings/UnsavedChangesGuard.tsx @@ -31,12 +31,12 @@ export function UnsavedChangesGuard({
- - diff --git a/canvas/src/components/tabs/ActivityTab.tsx b/canvas/src/components/tabs/ActivityTab.tsx index 74f0d781..fc857842 100644 --- a/canvas/src/components/tabs/ActivityTab.tsx +++ b/canvas/src/components/tabs/ActivityTab.tsx @@ -186,7 +186,7 @@ function ActivityRow({ : "bg-zinc-800/60 border-zinc-700/40" }`} > - e.target.files && onUpload(e.target.files)} /> - )} - {root === "/configs" && ( - )} -
diff --git a/canvas/src/components/tabs/TracesTab.tsx b/canvas/src/components/tabs/TracesTab.tsx index 199a08e0..39ef2a00 100644 --- a/canvas/src/components/tabs/TracesTab.tsx +++ b/canvas/src/components/tabs/TracesTab.tsx @@ -55,7 +55,7 @@ export function TracesTab({ workspaceId }: Props) {
{traces.length} traces -
diff --git a/canvas/src/components/tabs/config/form-inputs.tsx b/canvas/src/components/tabs/config/form-inputs.tsx index 2ae8de18..03929b74 100644 --- a/canvas/src/components/tabs/config/form-inputs.tsx +++ b/canvas/src/components/tabs/config/form-inputs.tsx @@ -104,7 +104,7 @@ export function TagList({ label, values, onChange, placeholder }: { label: strin {values.map((v, i) => ( {v} - + ))}
@@ -131,7 +131,7 @@ export function Section({ title, children, defaultOpen = true }: { title: string const [open, setOpen] = useState(defaultOpen); return (
- diff --git a/canvas/src/components/tabs/config/secrets-section.tsx b/canvas/src/components/tabs/config/secrets-section.tsx index b8286273..5e6844d5 100644 --- a/canvas/src/components/tabs/config/secrets-section.tsx +++ b/canvas/src/components/tabs/config/secrets-section.tsx @@ -113,9 +113,9 @@ function SecretRow({ label, secretKey, isSet, scope, globalMode, onSave, onDelet {isSet && Set} {scope && } {!editing && isSet && (globalMode || scope !== "global") && ( - + )} -
@@ -128,7 +128,7 @@ function SecretRow({ label, secretKey, isSet, scope, globalMode, onSave, onDelet type={isPlaintext ? "text" : "password"} autoFocus className="flex-1 bg-zinc-900 border border-zinc-600 rounded px-2 py-1 text-[10px] text-zinc-100 font-mono focus:outline-none focus:border-blue-500" /> - + )} {(canDelete || showOverride) && ( - )} @@ -181,7 +181,7 @@ function CustomSecretRow({ secretKey, scope, globalMode, onSave, onDelete }: { placeholder="New value" type="password" autoFocus className="flex-1 bg-zinc-900 border border-zinc-600 rounded px-2 py-1 text-[10px] text-zinc-100 font-mono focus:outline-none focus:border-blue-500" /> - - ) : ( - )}