Forums Bug Reports Thread

Boost level badge: white text on light-purple #a78bfa fails contrast (Law 3)

Patrick Bass · Jun 6 · 10 · 1 Locked
[Major] [High Priority] [Bug Fixed] [Always Reproduces]
🚀 OP Jun 6, 2026 7:06pm

Area: Monetization (audit p10) · Surface: /boost (boost level badge + tier markers) · Dimension: law-violation · Severity: major

The Server Boost badge renders white text on a hardcoded light-purple background (#a78bfa for Level 1, #f472b6 for Level 2). Both are pale enough that white text fails WCAG AA contrast in BOTH themes (the background color is fixed regardless of theme). Law 3 requires legible contrast in every theme. The same low-contrast pairing affects the progress-fill and level markers that reuse these colors.

Evidence

platform/public/css/style.css:12418-12427 `.boost-level-badge { ... color: #fff; }` combined with platform/src/Services/BoostLevel.php:17 `1 => ['name' => 'Level 1', 'threshold' => 5, 'color' => '#a78bfa']`. Template applies the tier color as the badge background: platform/templates/boost/index.php:22 `<span class="boost-level-badge" style="background:<?= $e($levelDef['color']) ?>;">`. White (#fff) on #a78bfa is ~2.2:1 contrast, far below the 4.5:1 AA threshold for the 14px (--font-size-sm) badge text. Level 1 is the most common badge a small community will earn (only 5 boosts).

Suggested fix. Either darken the tier palette so white text clears 4.5:1, or compute a contrasting text color per tier (dark text on the pale purple/pink levels, white only on the darker gold). At minimum add a text-shadow or switch the badge text to a tier-darkened shade rather than always #fff.

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


Patrick Bass
@mobieus

🚀 Jun 7, 2026 5:25am

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

Added a $badgeTextColor() luminance helper in templates/boost/index.php that returns #fff only when white clears WCAG 4.5:1 against the tier fill, else near-black #1a1a1a, and applied it as an inline color override on the .boost-level-badge (which otherwise hardcodes color:#fff in CSS) over the pale purple/pink/gold tier backgrounds.

Status: fixed. Thread closed and locked.


Patrick Bass
@mobieus

Log in or register to reply to this thread.