From 96df20b388d18d05e23d4e961c65745bd59c2b8f Mon Sep 17 00:00:00 2001 From: David Balderston Date: Fri, 9 Oct 2026 21:55:51 -0700 Subject: [PATCH] Require 4.5:1 contrast for normal-size text The accessibility rule allowed 3:1 for all text. WCAG 2.1 AA (1.4.3) requires 4.5:1 for normal-size text; 3:1 applies to large text and, under 1.4.11, to UI components and graphics. The skill's summary bullet said the same 3:1 and is corrected too. Part of #12. --- .cursorrules | 4 ++-- .github/copilot-instructions.md | 4 ++-- AGENTS.md | 4 ++-- CHANGELOG.md | 7 +++++++ CLAUDE.md | 4 ++-- library/tritonai/ucsd-decorator/SKILL.md | 3 ++- .../tritonai/ucsd-decorator/references/accessibility.md | 4 ++-- rules/40-accessibility.md | 4 ++-- skills/ucsd-decorator/SKILL.md | 3 ++- skills/ucsd-decorator/references/accessibility.md | 4 ++-- 10 files changed, 25 insertions(+), 16 deletions(-) diff --git a/.cursorrules b/.cursorrules index b0956f0..b4bcb54 100644 --- a/.cursorrules +++ b/.cursorrules @@ -458,8 +458,8 @@ generated content must be usable by people with disabilities. ### Content and presentation -- Minimum 3:1 contrast against adjacent colors for UI components, graphical - objects, and text. +- Contrast is at least 4.5:1 for text, 3:1 for large text (24px, or 18.66px + bold), and 3:1 for UI components and graphics against adjacent colors. - Never use color as the only means of conveying information or state. - Every `` has a meaningful `alt`, or `alt=""` if genuinely decorative. - No strobe or flashing. Nothing flashes more than three times per second. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index b8b5233..ceedfe8 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -458,8 +458,8 @@ generated content must be usable by people with disabilities. ### Content and presentation -- Minimum 3:1 contrast against adjacent colors for UI components, graphical - objects, and text. +- Contrast is at least 4.5:1 for text, 3:1 for large text (24px, or 18.66px + bold), and 3:1 for UI components and graphics against adjacent colors. - Never use color as the only means of conveying information or state. - Every `` has a meaningful `alt`, or `alt=""` if genuinely decorative. - No strobe or flashing. Nothing flashes more than three times per second. diff --git a/AGENTS.md b/AGENTS.md index 1280272..198e8cf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -458,8 +458,8 @@ generated content must be usable by people with disabilities. ### Content and presentation -- Minimum 3:1 contrast against adjacent colors for UI components, graphical - objects, and text. +- Contrast is at least 4.5:1 for text, 3:1 for large text (24px, or 18.66px + bold), and 3:1 for UI components and graphics against adjacent colors. - Never use color as the only means of conveying information or state. - Every `` has a meaningful `alt`, or `alt=""` if genuinely decorative. - No strobe or flashing. Nothing flashes more than three times per second. diff --git a/CHANGELOG.md b/CHANGELOG.md index ea5bcb9..0f5a392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,13 @@ existing project, then follow the generated rule files. It holds no rules itself. +### Fixed + +- **Text contrast follows WCAG 2.1 AA.** The accessibility rule allowed 3:1 for + all text. Normal text now needs 4.5:1; 3:1 still applies to large text + (24px, or 18.66px bold) and to UI components and graphics. The skill's + summary says the same. See #12. + ## 2.5.0 ### Changed diff --git a/CLAUDE.md b/CLAUDE.md index 2519a11..81127ce 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -458,8 +458,8 @@ generated content must be usable by people with disabilities. ### Content and presentation -- Minimum 3:1 contrast against adjacent colors for UI components, graphical - objects, and text. +- Contrast is at least 4.5:1 for text, 3:1 for large text (24px, or 18.66px + bold), and 3:1 for UI components and graphics against adjacent colors. - Never use color as the only means of conveying information or state. - Every `` has a meaningful `alt`, or `alt=""` if genuinely decorative. - No strobe or flashing. Nothing flashes more than three times per second. diff --git a/library/tritonai/ucsd-decorator/SKILL.md b/library/tritonai/ucsd-decorator/SKILL.md index 4dbe4c9..1a139c9 100644 --- a/library/tritonai/ucsd-decorator/SKILL.md +++ b/library/tritonai/ucsd-decorator/SKILL.md @@ -429,7 +429,8 @@ missed: - Every interactive element is keyboard reachable with a visible focus state. - `tabindex` is only ever `0` or `-1`. - Never use `title` for tooltips. Never disable viewport zoom. -- Never use color alone to carry meaning; keep 3:1 minimum contrast. +- Never use color alone to carry meaning. Text contrast is at least 4.5:1, or + 3:1 for large text; UI components and graphics at least 3:1. - Bind every input to a `