Forums Bug Reports Thread

AI triage 'suggest:' badge hardcodes color:#1d4ed8 (dark blue) — low contrast on dark themes; the same bug was already fixed in content-filters but missed here

Patrick Bass · Jun 6 · 9 · 1 Locked
[Minor] [Normal Priority] [Bug Fixed] [Always Reproduces]
🚀 OP Jun 6, 2026 8:20pm

Area: Admin deep-dive (trust/safety) (audit p15a) · Surface: /admin/moderation (AI triage results), templates/admin/moderation/index.php · Dimension: law-3-contrast · Severity: minor

The 'suggest: <action>' pill in the AI bulk-triage output uses a fixed dark-blue text color (#1d4ed8) on a translucent blue background with no theme-aware token. On dark themes this is dark-blue-on-dark, exactly the dark-on-dark failure the team called out and already remediated for the content-filters AI suggestions. This instance was missed by that sweep.

Evidence

templates/admin/moderation/index.php:443 `sa.style.cssText = 'padding:1px 8px; border-radius:9999px; background:rgba(95,134,255,.18); color:#1d4ed8; font-size:0.72rem; font-weight:700; text-transform:uppercase;';`. The sibling AI surface explicitly fixed this exact value: content-filters/index.php:172-173 `// Canonical themed badge (was hardcoded #1d4ed8 dark-on-dark on 6/7 themes). act.className = 'badge badge-info';`. Other elements in the same triage block correctly use themed fallbacks, e.g. line 449 `color:var(--color-text-muted,#5b6477)`.

Suggested fix. Replace the inline span styling with the canonical themed badge used in content-filters: `sa.className = 'badge badge-info'; sa.style.textTransform = 'uppercase';` (drop the hardcoded background/color). This matches the existing fix at content-filters/index.php:173 and stays contrast-safe in every 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:49am

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

Replaced the hardcoded inline span styling (background:rgba(95,134,255,.18); color:#1d4ed8) on the AI triage suggested-action badge with the canonical themed badge: sa.className = 'badge badge-info'; sa.style.textTransform = 'uppercase'. Matches content-filters/index.php:173 and stays contrast-safe in every theme.

Status: fixed. Thread closed and locked.


Patrick Bass
@mobieus

Log in or register to reply to this thread.