From d45c9c934963552f2228866cc6e8cd8124d53df6 Mon Sep 17 00:00:00 2001 From: Allison Date: Mon, 27 Apr 2026 21:37:05 -0400 Subject: [PATCH] =?UTF-8?q?fix(marketing):=20A-2.8b=20=E2=80=94=20Loi=2025?= =?UTF-8?q?=20badge=20contrast=20(WCAG=20AA)=20+=20stale=20docstring?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Loi 25 article number badges (Art. 3.3, 3.5, 14): change from `grad-bg text-white text-xs font-black` to `bg-brand-navy text-white text-xs font-black`. White-on-grad-bg failed AA on the cyan/green portion of the gradient (~2:1 contrast); solid navy gives ~16:1. - Update routes.py module docstring to past tense (A-2.8b is now done). - Add regression assertion ensuring badges use solid navy, not grad-bg. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/marketing/routes.py | 2 +- templates/marketing/conformite.html | 2 +- tests/test_marketing_secondary_pages.py | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/marketing/routes.py b/src/marketing/routes.py index ff08c77..790632a 100644 --- a/src/marketing/routes.py +++ b/src/marketing/routes.py @@ -2,7 +2,7 @@ Phase 2 (A-2.1+): renders templates/marketing/landing.html. Tasks A-2.2 through A-2.7 will progressively enrich the landing template. -Task A-2.8a added /tarifs and /fonctionnalites; A-2.8b will add /conformite and /contact. +Tasks A-2.8a + A-2.8b added /tarifs, /fonctionnalites, /conformite, /contact. """ from flask import render_template diff --git a/templates/marketing/conformite.html b/templates/marketing/conformite.html index 9f0387a..f1c57e4 100644 --- a/templates/marketing/conformite.html +++ b/templates/marketing/conformite.html @@ -96,7 +96,7 @@
- {{ art.num | safe }} + {{ art.num | safe }}

{{ art.title | safe }}

diff --git a/tests/test_marketing_secondary_pages.py b/tests/test_marketing_secondary_pages.py index c0127c6..df59d0a 100644 --- a/tests/test_marketing_secondary_pages.py +++ b/tests/test_marketing_secondary_pages.py @@ -219,6 +219,13 @@ def test_conformite_loi25_3_articles(): # Article topics for topic in ['EFVP', 'Audit trail', 'Consentement']: assert topic in body, f"Conformité missing Loi 25 topic: {topic}" + # I-1 fix: badge must use solid bg-brand-navy (not grad-bg) — WCAG AA + # text-on-grad-bg only achieves ~2:1 contrast on the cyan/green portion + assert 'bg-brand-navy text-white text-xs font-black' in body, \ + "Loi 25 badges must use solid navy background for WCAG AA contrast (not grad-bg)" + # The grad-bg should NOT appear with the small badge text combo + assert 'grad-bg text-white text-xs font-black' not in body, \ + "Removed grad-bg + small white text combo (WCAG AA fail)" def test_conformite_agpl_section_with_external_links():