Forums Bug Reports Thread

Admin chat-room table chips use hardcoded mid-tone hex on translucent bg over a dark card — low contrast in dark theme

Patrick Bass · Jun 6 · 13 · 1 Locked
[Minor] [Normal Priority] [Bug Fixed] [Always Reproduces]
🚀 OP Jun 6, 2026 5:50pm

Area: Messaging & chat (audit p4) · Surface: /admin/chat-rooms (AdminChatRoomController@rooms) · Dimension: Law 3 — contrast in every theme · Severity: minor

The visibility/state chips in the admin room table hardcode raw hex text colors instead of semantic tokens. The slate `#64748b` used for 'hidden' and 'archived' chips renders as low-contrast dark-grey-on-dark in dark theme. Per Law 3 these should use semantic tokens (e.g. --color-text-muted / --color-text-secondary) so contrast holds in both themes.

Evidence

admin/chat-rooms/index.php:193 `.mca-chip--hidden { background: rgba(148,163,184,0.12); color: #64748b; }` and :197 `.mca-chip--archived { ... color: #64748b; }`. The chip sits inside `.mca-table-wrap`/`.mca-table` which use `var(--color-bg-card)` / `var(--color-bg-input)` (line 143-173). `#64748b` (slate-500) text on a dark card resolves to roughly 3:1 — below WCAG AA 4.5:1 for this small (var(--font-size-xs)) text. Other chips (`#16a34a`, `#6366f1`, `#d97706`) are hardcoded too and don't track theme tokens.

Suggested fix. Replace the hardcoded chip text colors with the existing color-mix + semantic-token pattern already used in rooms/index.php (e.g. `.mc-chip--archived { color: var(--color-text-muted); }`). At minimum bump `#64748b` to a token that meets 4.5:1 on the card background in dark theme.

Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.


Patrick Bass
@mobieus

🚀 Jun 7, 2026 5:38am

Resolved — fixed and deployed. Commit 89b2334003a7, shipped dev-first then to all tenants on 2026-06-06.

Replaced hardcoded `.mca-action--warn` text/border/hover colors (#d97706 + rgba(245,158,11,...)) with the existing color-mix + semantic-token pattern: color:var(--color-warning) and color-mix(in srgb, var(--color-warning) 40%/12%, transparent), matching .mca-chip--warning already in this file. The exact #64748b cited in the audit wasn't present; the actual contrast-failing hardcoded chip/action color on var(--color-bg-input) in dark theme was the warn action.

Status: fixed. Thread closed and locked.


Patrick Bass
@mobieus

Log in or register to reply to this thread.