From 711f218622f403d8b12cdc3b354aa1c783f91b76 Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Sat, 25 Apr 2026 14:41:12 +0300 Subject: [PATCH] fix(redesign): a11y, mobile, perf polish for production push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Comprehensive pre-production sweep across the Aurora redesign — drives svelte-check to 0 errors / 0 warnings (was 61) without changing visual intent. Highlights: - Mobile: hero title shrinks at 480px, signal-list stacks timestamp under sentence below 640px, sidebar icon buttons bumped to 40x40 - Light theme: muted-foreground darkened to #3a3560 to clear WCAG AA on glass surfaces and the modal close button - Perf: topbar backdrop-filter 28→14px, mobile-more sheet 28→12px to cut concurrent blur layers on mid-tier mobile - a11y: prefers-reduced-motion mute for aurora drift / pulses / shimmer / stagger; aria-label on every icon-only button; aria-describedby on Hint; combobox/listbox/aria-activedescendant on SearchPalette; modal dialog tabindex; 47 label-without-control warnings across 14 form pages cleaned up via for=/id= or label→div - Dashboard derived state split into topology- vs status-bound layers so polling no longer re-runs the full provider/wires computation - Mobile bottom nav derived from baseNavEntries by key lookup so adding a top-level nav entry keeps the two trees in sync - Bug: template-configs page now respects the global provider filter for both the count meter and the type pill (was reading the unfiltered cache) - Misc: portal EventChart tooltip and switch its swatches to Aurora tokens; CollapsibleSlot warning state uses warning-fg/-bg tokens instead of #d97706; Hint z-index 99999→9999; element refs across Modal/EntitySelect/MultiEntitySelect/SearchPalette/IconGridSelect/ Hint/targets converted to \$state for reactivity; 4 dead .topbar-cta selectors removed --- frontend/src/app.css | 27 +++++- .../src/lib/components/CollapsibleSlot.svelte | 2 +- .../src/lib/components/EntitySelect.svelte | 4 +- frontend/src/lib/components/EventChart.svelte | 10 +- frontend/src/lib/components/Hint.svelte | 8 +- .../src/lib/components/IconGridSelect.svelte | 4 +- frontend/src/lib/components/Modal.svelte | 13 ++- .../lib/components/MultiEntitySelect.svelte | 4 +- .../src/lib/components/SearchPalette.svelte | 18 +++- frontend/src/routes/+layout.svelte | 81 ++++++++-------- frontend/src/routes/+page.svelte | 94 ++++++++++++++----- frontend/src/routes/actions/+page.svelte | 6 +- frontend/src/routes/actions/RuleEditor.svelte | 26 ++--- .../src/routes/command-configs/+page.svelte | 18 ++-- .../command-template-configs/+page.svelte | 4 +- .../src/routes/command-trackers/+page.svelte | 4 +- .../LinkedTargetsSection.svelte | 4 +- .../notification-trackers/TrackerForm.svelte | 4 +- frontend/src/routes/providers/+page.svelte | 4 +- .../src/routes/providers/new/+page.svelte | 2 +- .../src/routes/settings/backup/+page.svelte | 19 ++-- frontend/src/routes/targets/+page.svelte | 2 +- frontend/src/routes/targets/TargetForm.svelte | 12 +-- .../src/routes/template-configs/+page.svelte | 14 +-- .../src/routes/tracking-configs/+page.svelte | 2 +- 25 files changed, 233 insertions(+), 153 deletions(-) diff --git a/frontend/src/app.css b/frontend/src/app.css index b9fc4e9..9b91e1a 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -90,7 +90,7 @@ --color-background-deep: #ede9fe; --color-foreground: #1a1530; --color-muted: rgba(20, 15, 60, 0.04); - --color-muted-foreground: #4a4670; + --color-muted-foreground: #3a3560; --color-border: rgba(20, 15, 60, 0.08); --color-glass: rgba(255, 255, 255, 0.55); @@ -434,3 +434,28 @@ button:focus-visible, a:focus-visible { opacity: 0.5; animation: none; } + +/* === Reduced-motion: kill drift, pulses, shimmers, stagger entrances === */ +@media (prefers-reduced-motion: reduce) { + body::before { animation: none !important; } + .animate-fade-slide-in, + .animate-shimmer, + .animate-pulse-glow, + .animate-count-up, + .animate-rise, + .stagger-children > *, + .aurora-pulse, + .aurora-pulse.warn, + .aurora-pulse.error { + animation: none !important; + } + .stat-card, + .paginator-btn, + .signal-row, + .provider-row { + transition: none !important; + } + * { + scroll-behavior: auto !important; + } +} diff --git a/frontend/src/lib/components/CollapsibleSlot.svelte b/frontend/src/lib/components/CollapsibleSlot.svelte index e6c1175..1149dd1 100644 --- a/frontend/src/lib/components/CollapsibleSlot.svelte +++ b/frontend/src/lib/components/CollapsibleSlot.svelte @@ -21,7 +21,7 @@ const STATUS_MAP: Record = { empty: { icon: 'mdiCircleOutline', color: 'var(--color-muted-foreground)', bg: 'transparent' }, valid: { icon: 'mdiCheckCircle', color: 'var(--color-success-fg)', bg: 'var(--color-success-bg)' }, - warning: { icon: 'mdiAlert', color: '#d97706', bg: 'rgba(217, 119, 6, 0.1)' }, + warning: { icon: 'mdiAlert', color: 'var(--color-warning-fg)', bg: 'var(--color-warning-bg)' }, error: { icon: 'mdiAlertCircle', color: 'var(--color-error-fg)', bg: 'var(--color-error-bg)' }, }; const statusConfig = $derived(STATUS_MAP[status]); diff --git a/frontend/src/lib/components/EntitySelect.svelte b/frontend/src/lib/components/EntitySelect.svelte index e0f9732..08f2272 100644 --- a/frontend/src/lib/components/EntitySelect.svelte +++ b/frontend/src/lib/components/EntitySelect.svelte @@ -35,8 +35,8 @@ let open = $state(false); let query = $state(''); let highlightIdx = $state(0); - let inputEl: HTMLInputElement; - let listEl: HTMLDivElement; + let inputEl = $state(); + let listEl = $state(); const selected = $derived(items.find(i => String(i.value) === String(value))); diff --git a/frontend/src/lib/components/EventChart.svelte b/frontend/src/lib/components/EventChart.svelte index 64736a3..685e03b 100644 --- a/frontend/src/lib/components/EventChart.svelte +++ b/frontend/src/lib/components/EventChart.svelte @@ -14,11 +14,11 @@ const EVENT_TYPES = ['assets_added', 'assets_removed', 'collection_renamed', 'collection_deleted', 'sharing_changed'] as const; const COLORS: Record = { - assets_added: '#059669', - assets_removed: '#ef4444', - collection_renamed: '#6366f1', - collection_deleted: '#dc2626', - sharing_changed: '#f59e0b', + assets_added: 'var(--color-mint)', + assets_removed: 'var(--color-coral)', + collection_renamed: 'var(--color-primary)', + collection_deleted: 'var(--color-error-fg)', + sharing_changed: 'var(--color-citrus)', }; const LABELS: Record = { diff --git a/frontend/src/lib/components/Hint.svelte b/frontend/src/lib/components/Hint.svelte index c5bd217..b8b6260 100644 --- a/frontend/src/lib/components/Hint.svelte +++ b/frontend/src/lib/components/Hint.svelte @@ -4,7 +4,8 @@ let { text = '' } = $props<{ text: string }>(); let visible = $state(false); let tooltipStyle = $state(''); - let btnEl: HTMLButtonElement; + let btnEl = $state(); + const tooltipId = `hint-${Math.random().toString(36).slice(2, 9)}`; function show() { if (!btnEl) return; @@ -14,7 +15,7 @@ let left = rect.left + rect.width / 2 - tooltipWidth / 2; if (left < 8) left = 8; if (left + tooltipWidth > window.innerWidth - 8) left = window.innerWidth - tooltipWidth - 8; - tooltipStyle = `position:fixed; z-index:99999; bottom:${window.innerHeight - rect.top + 8}px; left:${left}px; width:${tooltipWidth}px;`; + tooltipStyle = `position:fixed; z-index:9999; bottom:${window.innerHeight - rect.top + 8}px; left:${left}px; width:${tooltipWidth}px;`; } function hide() { @@ -31,13 +32,14 @@ onfocus={show} onblur={hide} aria-label={text} + aria-describedby={visible ? tooltipId : undefined} title={text} tabindex="0" >? {#if visible}
- diff --git a/frontend/src/lib/components/IconGridSelect.svelte b/frontend/src/lib/components/IconGridSelect.svelte index 5cf58d7..e0417c4 100644 --- a/frontend/src/lib/components/IconGridSelect.svelte +++ b/frontend/src/lib/components/IconGridSelect.svelte @@ -28,8 +28,8 @@ let open = $state(false); let search = $state(''); - let triggerEl: HTMLButtonElement; - let searchEl: HTMLInputElement; + let triggerEl = $state(); + let searchEl = $state(); let popupStyle = $state(''); const showSearch = $derived(items.length > 4); diff --git a/frontend/src/lib/components/Modal.svelte b/frontend/src/lib/components/Modal.svelte index 3bff9a0..9f7d510 100644 --- a/frontend/src/lib/components/Modal.svelte +++ b/frontend/src/lib/components/Modal.svelte @@ -1,5 +1,4 @@