From cf12558c4793cd1d16c6fa325db9d5f7be71f63e Mon Sep 17 00:00:00 2001 From: daniel-techAI <290375699+daniel-techAI@users.noreply.github.com> Date: Sun, 2 Aug 2026 13:45:33 +0200 Subject: [PATCH 1/2] fix: raise brass label contrast --- styles.css | 2 +- tests/site-quality.spec.mjs | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/styles.css b/styles.css index a609632..48a0686 100644 --- a/styles.css +++ b/styles.css @@ -3268,7 +3268,7 @@ h2 { --blue-dark: #073d24; --green: #157044; --green-soft: #edf5ef; - --brass: #9b722d; + --brass: #7a541c; --shadow: 0 26px 70px rgba(9, 34, 21, 0.09); --radius: 4px; --max: 1280px; diff --git a/tests/site-quality.spec.mjs b/tests/site-quality.spec.mjs index 7756bcb..e8feffe 100644 --- a/tests/site-quality.spec.mjs +++ b/tests/site-quality.spec.mjs @@ -43,6 +43,26 @@ test("homepage has no automated WCAG A or AA violations", async ({ page }) => { await expectNoAxeViolations(page); }); +test("small brass labels retain WCAG AA contrast on white surfaces", async ({ page }) => { + await page.goto("/"); + + for (const label of [page.locator(".process-list article span").first(), page.locator(".popular").first()]) { + const contrast = await label.evaluate((element) => { + const values = getComputedStyle(element).color.match(/[\d.]+/g)?.slice(0, 3).map(Number); + if (!values || values.length !== 3) return 0; + + const luminance = values + .map((value) => value / 255) + .map((value) => (value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4)) + .reduce((sum, value, index) => sum + value * [0.2126, 0.7152, 0.0722][index], 0); + + return 1.05 / (luminance + 0.05); + }); + + expect(contrast).toBeGreaterThanOrEqual(4.5); + } +}); + test("skip link moves keyboard focus to the main content", async ({ page }) => { await page.goto("/"); await page.keyboard.press("Tab"); From c970fcdf7916d2e48fec08d55a9a22779dc7f99e Mon Sep 17 00:00:00 2001 From: daniel-techAI <290375699+daniel-techAI@users.noreply.github.com> Date: Sun, 2 Aug 2026 13:51:30 +0200 Subject: [PATCH 2/2] test: target rendered brass labels --- tests/site-quality.spec.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/site-quality.spec.mjs b/tests/site-quality.spec.mjs index e8feffe..6d70ba6 100644 --- a/tests/site-quality.spec.mjs +++ b/tests/site-quality.spec.mjs @@ -46,7 +46,7 @@ test("homepage has no automated WCAG A or AA violations", async ({ page }) => { test("small brass labels retain WCAG AA contrast on white surfaces", async ({ page }) => { await page.goto("/"); - for (const label of [page.locator(".process-list article span").first(), page.locator(".popular").first()]) { + for (const label of [page.locator(".trust-grid article span").first(), page.locator(".popular").first()]) { const contrast = await label.evaluate((element) => { const values = getComputedStyle(element).color.match(/[\d.]+/g)?.slice(0, 3).map(Number); if (!values || values.length !== 3) return 0;