From d4d70f86f962c5b60130ef03bb7fc8d7a8bfbf65 Mon Sep 17 00:00:00 2001 From: kures Date: Fri, 8 May 2026 20:19:57 +0300 Subject: [PATCH 1/2] ui: fix top a11y issues from web-design-guidelines audit Keyboard users had no visible focus, motion-sensitive users got the CRT drift even with prefers-reduced-motion set, the run-interrupt overlay was a non-semantic div that needed an a11y-suppress comment, and the provider/channel reorder/remove buttons were icon-only with no screen-reader name. - app.css: replace global `outline: none` with `:focus-visible` ring (2px solid accent + 2px offset) covering input/textarea/button/anchor; add `@media (prefers-reduced-motion: reduce)` block that neutralises CRT scanline + pulse animations. - InterruptPanel: drop the `
` overlay backdrop in favour of a real ` +
@@ -355,7 +355,7 @@ padding: 1rem; margin-bottom: 0.75rem; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; } .channel-row:hover { @@ -449,7 +449,7 @@ font-size: 0.875rem; font-family: var(--font-mono); outline: none; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); } @@ -486,7 +486,7 @@ color: var(--fg-dim); font-size: 1rem; cursor: pointer; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; } .remove-btn:hover { background: color-mix(in srgb, var(--error, #e55) 15%, transparent); @@ -514,7 +514,7 @@ font-size: 0.8rem; font-family: var(--font-mono); cursor: pointer; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; text-transform: uppercase; letter-spacing: 1px; } @@ -552,7 +552,7 @@ text-transform: uppercase; letter-spacing: 1px; cursor: pointer; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; } .add-btn:hover { border-color: var(--accent); @@ -591,7 +591,7 @@ background: var(--bg-surface); border: 1px solid var(--border); border-radius: 2px; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5); } .toggle-slider::before { @@ -603,7 +603,7 @@ top: 3px; background: var(--fg-dim); border-radius: 2px; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; } .toggle input:checked + .toggle-slider { background: color-mix(in srgb, var(--accent) 20%, transparent); @@ -654,7 +654,7 @@ border-bottom: 1px solid var(--border); color: var(--fg); cursor: pointer; - transition: all 0.15s ease; + transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease, text-shadow 0.15s ease; text-align: left; font-family: var(--font-mono); } diff --git a/ui/src/lib/components/ConfigEditor.svelte b/ui/src/lib/components/ConfigEditor.svelte index 03e8c55..278f853 100644 --- a/ui/src/lib/components/ConfigEditor.svelte +++ b/ui/src/lib/components/ConfigEditor.svelte @@ -185,7 +185,7 @@ text-transform: uppercase; letter-spacing: 1px; cursor: pointer; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, text-shadow 0.2s ease; } .mode-btn:first-child { border-radius: 2px 0 0 2px; @@ -218,7 +218,7 @@ font-weight: 700; text-transform: uppercase; letter-spacing: 1px; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, text-shadow 0.2s ease; box-shadow: inset 0 0 8px color-mix(in srgb, var(--accent) 30%, transparent); } .save-btn:hover:not(:disabled) { @@ -275,11 +275,12 @@ font-size: 0.875rem; resize: none; line-height: 1.6; - outline: none; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, text-shadow 0.2s ease; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5); } - .raw-editor:focus { + .raw-editor:focus-visible { + outline: 2px solid var(--accent); + outline-offset: 2px; border-color: var(--accent); box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 8px var(--border-glow); } diff --git a/ui/src/lib/components/InstanceCard.svelte b/ui/src/lib/components/InstanceCard.svelte index dae88ef..7947915 100644 --- a/ui/src/lib/components/InstanceCard.svelte +++ b/ui/src/lib/components/InstanceCard.svelte @@ -92,7 +92,7 @@ border: 1px solid var(--border); border-radius: 4px; color: var(--fg); - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; backdrop-filter: blur(4px); } .card:hover { @@ -155,7 +155,7 @@ text-transform: uppercase; letter-spacing: 1px; cursor: pointer; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; text-shadow: var(--text-glow); } .card-actions button:hover { diff --git a/ui/src/lib/components/ProviderList.svelte b/ui/src/lib/components/ProviderList.svelte index 2ce08d4..800f785 100644 --- a/ui/src/lib/components/ProviderList.svelte +++ b/ui/src/lib/components/ProviderList.svelte @@ -389,18 +389,21 @@ class="icon-btn" onclick={() => moveUp(i)} disabled={i === 0} - title="Move up">↑
@@ -553,7 +556,7 @@ padding: 1rem; margin-bottom: 0.75rem; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; } .provider-row:hover { @@ -588,7 +591,7 @@ font-size: 0.875rem; font-family: var(--font-mono); outline: none; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; } .provider-row-header select:focus { @@ -614,7 +617,7 @@ color: var(--fg-dim); font-size: 1rem; cursor: pointer; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; } .icon-btn:hover:not(:disabled) { @@ -662,7 +665,7 @@ font-size: 0.875rem; font-family: var(--font-mono); outline: none; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); } @@ -749,7 +752,7 @@ text-transform: uppercase; letter-spacing: 1px; cursor: pointer; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; } .status-dot { @@ -825,7 +828,7 @@ cursor: pointer; text-align: left; font-family: var(--font-mono); - transition: all 0.15s ease; + transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease, text-shadow 0.15s ease; } .saved-item:last-child { diff --git a/ui/src/lib/components/TopBar.svelte b/ui/src/lib/components/TopBar.svelte index 36c0315..b8c373c 100644 --- a/ui/src/lib/components/TopBar.svelte +++ b/ui/src/lib/components/TopBar.svelte @@ -169,13 +169,14 @@ font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; - outline: none; cursor: pointer; - transition: all 0.2s ease; + transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease; } - .theme-select:focus, + .theme-select:focus-visible, .theme-select:hover { + outline: 2px solid var(--accent); + outline-offset: 2px; border-color: var(--accent); box-shadow: 0 0 8px var(--border-glow); } diff --git a/ui/src/lib/components/orchestration/InterruptPanel.svelte b/ui/src/lib/components/orchestration/InterruptPanel.svelte index 136bcd5..5730d4a 100644 --- a/ui/src/lib/components/orchestration/InterruptPanel.svelte +++ b/ui/src/lib/components/orchestration/InterruptPanel.svelte @@ -30,9 +30,9 @@ } - -
-