From 732c10ed3446cf8537e6e018521dfc52a54a181a Mon Sep 17 00:00:00 2001 From: bastiensoret Date: Fri, 20 Mar 2026 14:41:16 +0100 Subject: [PATCH 1/2] style(ui): migrate colors to CSS custom properties and improve accessibility Replace all hardcoded color values with CSS custom properties (--color-* in popup, --si-* in overlay) for maintainability. Add ARIA attributes (aria-hidden on decorative SVGs, role="switch" on toggles, aria-label on overlays, aria-expanded on comment toggle). Animate comment body with max-height transition instead of display:none. Sanitize postsFlagged display and replace inline style manipulation with CSS classes. Co-Authored-By: Claude Opus 4.6 --- .claude/settings.json | 2 +- CHANGELOG.md | 14 ++ CLAUDE.md | 34 +++++ src/content/ui/icons.js | 28 ++-- src/content/ui/overlay-manager.js | 13 +- src/popup/popup.css | 169 +++++++++++++++-------- src/popup/popup.html | 25 ++-- src/popup/popup.js | 10 +- static/overlay.css | 214 +++++++++++++++++------------- 9 files changed, 324 insertions(+), 185 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index f27d4bb..854d2bd 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,7 +1,7 @@ { "permissions": { "allow": [ - "Bash(ls -la c:/Users/BSOR/CascadeProjects/Cesar/*.png c:/Users/BSOR/CascadeProjects/Cesar/static/icons/ c:/Users/BSOR/CascadeProjects/Cesar/store-assets/)" + ] } } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2725a3c..ffa5860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,20 @@ All notable changes to César are documented here. - Popup fetches provider names from background instead of hardcoded map - Feed scanner replaced `setInterval` polling with MutationObserver-only + debounce - Unused imports removed from `build.js` +- All hardcoded colors migrated to CSS custom properties (`--color-*` in popup, `--si-*` in overlay) +- SVG icons annotated with `aria-hidden="true"` for screen readers +- Popup toggles use `role="switch"` for correct ARIA semantics +- Toggle wrappers changed from `` to `