fix(webui): meet WCAG AA for log-level text on light theme
The log-level accent colors (info/success/warn/error) are tuned as fills; as small text on the light canvas they fell below WCAG AA (info 2.6:1, success 2.4:1, warn 2.0:1, error 4.3:1, trace 2.5:1). Add dedicated --log-* text tokens that are darkened in light mode (>=4.5:1) while keeping the bright, already-passing values in dark mode, so the app-wide accent is untouched. trace moves from /60 to /90 to clear AA yet stay the faintest level. Applied to both the logs page and overview RecentAlerts.
This commit is contained in:
3 files changed
+38
-10
No files matched your search
@@ -889,13 +889,16 @@ function AccountWidget({ config }: { config: AccountConfig }) {
|
||||
|
||||
// ─────────────── recent alerts ───────────────
|
||||
|
||||
// Same WCAG-tuned log-level text tokens as the logs page (see index.css / the
|
||||
// levelClass note there): the raw accent colors fail AA as small text on the
|
||||
// light canvas.
|
||||
const ALERT_LEVEL_CLASS: Record<LogLevel, string> = {
|
||||
trace: 'text-muted-foreground/60',
|
||||
trace: 'text-muted-foreground/90',
|
||||
debug: 'text-muted-foreground',
|
||||
info: 'text-primary',
|
||||
success: 'text-success',
|
||||
warn: 'text-warning',
|
||||
error: 'text-destructive',
|
||||
info: 'text-log-info',
|
||||
success: 'text-log-success',
|
||||
warn: 'text-log-warn',
|
||||
error: 'text-log-error',
|
||||
};
|
||||
|
||||
function RecentAlertsCard({ config }: { config: AlertsConfig }) {
|
||||
|
||||
Reference in new issue
Block a user