From 85f767962a30c3fad0ea9bbe8c778410ffabd0eb Mon Sep 17 00:00:00 2001 From: "vivi-the-going-merry[bot]" <308115520+vivi-the-going-merry[bot]@users.noreply.github.com> Date: Thu, 24 Sep 2026 20:20:40 -0600 Subject: [PATCH] Darken default style colors to clear WCAG contrast minimums FrmStyle::get_defaults() shipped three color pairs below WCAG 2 AA thresholds, so any site using default front-end form styling failed 1.4.3/1.4.11 out of the box: - border_color D0D5DD on white: 1.47:1 (needs 3:1, SC 1.4.11) -> 898D92, 3.34:1 - submit_bg_color/submit_border_color 4199FD with white text: 2.92:1 (submit_weight is 'normal' at 14px, so the large/bold-text 3:1 exception doesn't apply; needs 4.5:1, SC 1.4.3) -> 3173BE, 4.85:1 - error_text F04438 on error_bg FEE4E2: 3.11:1 (needs 4.5:1, SC 1.4.3) -> B4332A, 5.05:1 submit_hover_bg_color/submit_hover_border_color/submit_active_bg_color/ submit_active_border_color (3680D3) also moved to 2A63A4 so the hover/active states stay darker than the new higher-contrast resting state instead of becoming lighter than it. Ratios computed with the WCAG relative-luminance formula, not eyeballed. border_color_disabled keeps the old D0D5DD (WCAG 1.4.11 exempts disabled controls); border_color_active/progress_active_bg_color keep the old 4199FD (same underlying value, but a separate focus-indicator/ progress-bar violation the issue didn't scope in) - flagged as a follow-up in the PR. --- classes/models/FrmStyle.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/classes/models/FrmStyle.php b/classes/models/FrmStyle.php index 7cb8e3bb13..5fe3fcea3f 100644 --- a/classes/models/FrmStyle.php +++ b/classes/models/FrmStyle.php @@ -763,7 +763,7 @@ public function get_defaults() { 'field_weight' => 'normal', 'text_color' => '1D2939', // 'border_color_hv' => 'cccccc', - 'border_color' => 'D0D5DD', + 'border_color' => '898D92', 'field_border_width' => '1px', 'field_border_style' => 'solid', @@ -808,8 +808,8 @@ public function get_defaults() { 'submit_font_size' => '14px', 'submit_width' => 'auto', 'submit_height' => 'auto', - 'submit_bg_color' => '4199FD', - 'submit_border_color' => '4199FD', + 'submit_bg_color' => '3173BE', + 'submit_border_color' => '3173BE', 'submit_border_width' => '1px', 'submit_text_color' => 'ffffff', 'submit_weight' => 'normal', @@ -818,17 +818,17 @@ public function get_defaults() { 'submit_margin' => '10px', 'submit_padding' => '8px 16px', 'submit_shadow_color' => 'eeeeee', - 'submit_hover_bg_color' => '3680D3', + 'submit_hover_bg_color' => '2A63A4', 'submit_hover_color' => 'ffffff', - 'submit_hover_border_color' => '3680D3', - 'submit_active_bg_color' => '3680D3', + 'submit_hover_border_color' => '2A63A4', + 'submit_active_bg_color' => '2A63A4', 'submit_active_color' => 'ffffff', - 'submit_active_border_color' => '3680D3', + 'submit_active_border_color' => '2A63A4', 'border_radius' => '8px', 'error_bg' => 'FEE4E2', 'error_border' => 'F5B8AA', - 'error_text' => 'F04438', + 'error_text' => 'B4332A', 'error_font_size' => '14px', 'success_bg_color' => 'DFF0D8',