From a8e9b6177f58f7c981b4d520380867c60b555732 Mon Sep 17 00:00:00 2001 From: Molecule AI Core-UIUX Date: Mon, 18 May 2026 01:00:57 +0000 Subject: [PATCH] fix(canvas): add role=alert + aria-live=assertive to error states (WCAG 4.1.3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Screen readers were not announcing error messages in several canvas components. Each error div now uses role=alert so assistive technology announces the error immediately and assertively — without the user having to manually navigate to find the error. Fixed: ConfigTab, ScheduleTab, MissingKeysModal (per-entry + global), WorkspaceUsage. Co-Authored-By: Claude Opus 4.7 --- canvas/src/components/MissingKeysModal.tsx | 4 ++-- canvas/src/components/WorkspaceUsage.tsx | 2 +- canvas/src/components/tabs/ConfigTab.tsx | 2 +- canvas/src/components/tabs/ScheduleTab.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/canvas/src/components/MissingKeysModal.tsx b/canvas/src/components/MissingKeysModal.tsx index 54eceff3e..8329b8153 100644 --- a/canvas/src/components/MissingKeysModal.tsx +++ b/canvas/src/components/MissingKeysModal.tsx @@ -459,7 +459,7 @@ function ProviderPickerModal({ )} {entry.error && ( -
{entry.error}
+
{entry.error}
)} ))} @@ -718,7 +718,7 @@ function AllKeysModal({ ))} {globalError && ( -
+
{globalError}
)} diff --git a/canvas/src/components/WorkspaceUsage.tsx b/canvas/src/components/WorkspaceUsage.tsx index 810323846..ab78e01e9 100644 --- a/canvas/src/components/WorkspaceUsage.tsx +++ b/canvas/src/components/WorkspaceUsage.tsx @@ -71,7 +71,7 @@ export function WorkspaceUsage({ workspaceId }: WorkspaceUsageProps) { ) : error ? ( -

+

{error}

) : metrics ? ( diff --git a/canvas/src/components/tabs/ConfigTab.tsx b/canvas/src/components/tabs/ConfigTab.tsx index 645edc25e..1d0696dd3 100644 --- a/canvas/src/components/tabs/ConfigTab.tsx +++ b/canvas/src/components/tabs/ConfigTab.tsx @@ -995,7 +995,7 @@ export function ConfigTab({ workspaceId }: Props) { )} {error && ( -
{error}
+
{error}
)} {!error && RUNTIMES_WITH_OWN_CONFIG.has(config.runtime || "") && (
diff --git a/canvas/src/components/tabs/ScheduleTab.tsx b/canvas/src/components/tabs/ScheduleTab.tsx index b25fbf1d6..084f5f495 100644 --- a/canvas/src/components/tabs/ScheduleTab.tsx +++ b/canvas/src/components/tabs/ScheduleTab.tsx @@ -275,7 +275,7 @@ export function ScheduleTab({ workspaceId }: Props) { Enabled
- {error &&
{error}
} + {error &&
{error}
}