From 2b25f69ea0b36bd48c94fe7909de4885ef83907d Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Mon, 5 Oct 2026 22:00:27 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=20a11y:=20Ring=20Content=20Rows=20in?= =?UTF-8?q?=20a=20Themeable=20Focus=20Role=20(#16740)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add a Focus Role for Rows Inside Content * test: Cover the Subtle Focus Role in the Mock Harness * test: Probe the Subtle Focus Role Through Its Theme Variable * test: Focus the Probe to Read the Subtle Focus Utility * test: Read the Subtle Focus Ring From Its Utility Property * fix: Ring the Subagent Progress Disclosure in the Subtle Focus Role --- client/src/components/Artifacts/Artifacts.tsx | 2 +- .../Messages/Content/ActivityPhaseGroup.tsx | 4 +- .../Messages/Content/FilePreviewDialog.tsx | 2 +- .../Messages/Content/Parts/Attachment.tsx | 6 +- .../Content/Parts/BackgroundTaskCall.tsx | 4 +- .../Chat/Messages/Content/Parts/Summary.tsx | 4 +- .../Content/Parts/ToolMermaidArtifact.tsx | 2 +- .../Chat/Messages/Content/RetrievalCall.tsx | 2 +- .../Messages/Content/SubagentProgress.tsx | 2 +- .../Chat/Messages/Content/ToolCallGroup.tsx | 2 +- .../Chat/Messages/Content/ToolCallInfo.tsx | 2 +- .../Chat/Messages/Content/verticals.tsx | 6 +- .../Chat/Messages/ui/SystemEvent.tsx | 2 +- .../Messages/Content/ActionButton.tsx | 2 +- .../Messages/Content/Mermaid/Export.tsx | 2 +- .../Content/Mermaid/MermaidHeader.tsx | 4 +- .../Messages/Content/ResultSwitcher.tsx | 4 +- .../components/Messages/Content/RunCode.tsx | 2 +- .../SidePanel/Memories/MemoryUsageBadge.tsx | 2 +- e2e/specs/mock/scenarios/focus-subtle.spec.ts | 134 ++++++++++++++++++ packages/client/src/components/Button.tsx | 2 +- packages/client/src/theme/README.md | 4 + packages/client/src/theme/defaults.css | 1 + packages/client/src/theme/defaults.spec.ts | 3 +- packages/client/src/theme/registry.spec.ts | 15 ++ packages/client/src/theme/registry.ts | 6 + .../src/theme/themes/clickhouse.spec.tsx | 6 + .../client/src/theme/themes/clickhouse.ts | 2 + .../client/src/theme/themes/clickui.spec.ts | 2 + packages/client/src/theme/themes/dark.ts | 1 + packages/client/src/theme/themes/default.ts | 1 + .../client/src/theme/themes/highContrast.ts | 2 + packages/client/src/theme/tokens.css | 2 + packages/client/src/theme/types/index.ts | 5 + packages/client/src/theme/utils/applyTheme.ts | 4 + packages/data-provider/src/theme.ts | 1 + 36 files changed, 217 insertions(+), 30 deletions(-) create mode 100644 e2e/specs/mock/scenarios/focus-subtle.spec.ts diff --git a/client/src/components/Artifacts/Artifacts.tsx b/client/src/components/Artifacts/Artifacts.tsx index db9e901852..ecd828b702 100644 --- a/client/src/components/Artifacts/Artifacts.tsx +++ b/client/src/components/Artifacts/Artifacts.tsx @@ -502,7 +502,7 @@ export default function Artifacts() { aria-valuemin={10} aria-valuemax={100} aria-valuenow={Math.round(height)} - className="bg-surface-primary-alt focus-visible:ring-border-heavy flex shrink-0 cursor-grab items-center justify-center pt-2.5 pb-1.5 focus-visible:ring-2 focus-visible:outline-hidden focus-visible:ring-inset active:cursor-grabbing" + className="bg-surface-primary-alt focus-visible:ring-focus-subtle flex shrink-0 cursor-grab items-center justify-center pt-2.5 pb-1.5 focus-visible:ring-2 focus-visible:outline-hidden focus-visible:ring-inset active:cursor-grabbing" onPointerDown={handleDragStart} onPointerMove={handleDragMove} onPointerUp={handleDragEnd} diff --git a/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx b/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx index c183f17432..b0a761bc8f 100644 --- a/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx +++ b/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx @@ -500,7 +500,7 @@ function FailedPeek({ type="button" className={cn( TOOL_ROW_CLASSES, - 'text-text-secondary hover:text-text-primary focus-visible:ring-border-heavy w-full pl-6 text-left focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset', + 'text-text-secondary hover:text-text-primary focus-visible:ring-focus-subtle w-full pl-6 text-left focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset', )} onClick={onReveal} data-testid="activity-phase-failed-peek" @@ -846,7 +846,7 @@ export default function ActivityPhaseGroup({ * supplies it today; stating it here keeps the requirement with * the element that depends on it. */ className={cn( - 'text-text-secondary hover:text-text-primary focus-visible:ring-border-heavy flex h-auto min-h-7 min-w-0 flex-1 items-center justify-start gap-2 rounded-none bg-transparent p-0 py-1 text-left font-medium hover:bg-transparent focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:outline-none focus-visible:ring-inset', + 'text-text-secondary hover:text-text-primary focus-visible:ring-focus-subtle flex h-auto min-h-7 min-w-0 flex-1 items-center justify-start gap-2 rounded-none bg-transparent p-0 py-1 text-left font-medium hover:bg-transparent focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:outline-none focus-visible:ring-inset', /** The open card's title: the one semibold, primary-colour line * in the fold, so the rows under it read as its contents. */ isExpanded && 'text-text-primary font-semibold', diff --git a/client/src/components/Chat/Messages/Content/FilePreviewDialog.tsx b/client/src/components/Chat/Messages/Content/FilePreviewDialog.tsx index 075c75d68e..71c5d52c88 100644 --- a/client/src/components/Chat/Messages/Content/FilePreviewDialog.tsx +++ b/client/src/components/Chat/Messages/Content/FilePreviewDialog.tsx @@ -276,7 +276,7 @@ export default function FilePreviewDialog({ @@ -390,7 +390,7 @@ const TextAttachment = memo( onClick={() => setExpanded((prev) => !prev)} aria-expanded={expanded} aria-controls={preId} - className="text-text-secondary hover:text-text-primary focus-visible:ring-border-heavy mt-2 text-xs transition-colors focus-visible:ring-2 focus-visible:outline-hidden" + className="text-text-secondary hover:text-text-primary focus-visible:ring-focus-subtle mt-2 text-xs transition-colors focus-visible:ring-2 focus-visible:outline-hidden" > {expanded ? localize('com_ui_collapse') : localize('com_ui_show_all')} diff --git a/client/src/components/Chat/Messages/Content/Parts/BackgroundTaskCall.tsx b/client/src/components/Chat/Messages/Content/Parts/BackgroundTaskCall.tsx index 405bfffacd..618de0d061 100644 --- a/client/src/components/Chat/Messages/Content/Parts/BackgroundTaskCall.tsx +++ b/client/src/components/Chat/Messages/Content/Parts/BackgroundTaskCall.tsx @@ -167,7 +167,7 @@ export default function BackgroundTaskCall({