Skip to content

fix(rules): hold large text to 3:1 in a11y/color-contrast #2105 - #2155

Merged
nc9 merged 2 commits into
mainfrom
boat/contrast-large-text-2105
Nov 20, 2026
Merged

nc9 merged 2 commits into
mainfrom
boat/contrast-large-text-2105

Conversation

@nc9

@nc9 nc9 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Closes #2105

Large text (18pt/24px+, or 14pt/18.67px+ bold, read from inline font-size and font-weight on the element or ancestors; headings, b, strong, th count as bold) is held to 3:1. Normal text keeps 4.5:1. When size cannot be read from inline styles the pair keeps 4.5:1 and details carry sizeUnknown and sizeNote.

Acceptance criteria:

  • Large text passes at 3:1, fails below: tests 'large text at 3.5:1 passes', 'large text at 2.5:1 fails...'
  • Normal text keeps 4.5:1: 'normal text at 3.5:1 fails at 4.5:1'
  • Unknown size keeps 4.5:1 and says so: 'a size the rule cannot read keeps 4.5:1 and says so'
  • Tests for 3.5 large pass, 2.5 large fail, 3.5 normal fail (plus inherited size)
  • docs/rules/a11y/color-contrast.mdx states both ratios and when each applies

Verification: packages/rules tests via scripts/test-suites.ts --run rules: 12509 pass, 0 fail; audit-engine color-contrast and a11y-wcag files pass; rules typecheck clean; docs make validate ok.
Agent skill change: not needed.

@nc9
nc9 marked this pull request as ready for review November 20, 2026 21:04
@nc9
nc9 merged commit 33718b1 into main Nov 20, 2026
8 of 15 checks passed
@nc9
nc9 deleted the boat/contrast-large-text-2105 branch November 20, 2026 21:38
nc9 added a commit that referenced this pull request Nov 21, 2026
* origin/main:
  test(audit-engine): carriedCheckAsFailure keeps the continuation mark #2098 (#2166)
  fix(rules): correct zoom-disabled 1.4.4 wording, related criteria for wcagNone rules #2115 (#2174)
  refactor(cli): list bash completion flags one per line #2116 (#2175)
  feat(rules): waive a public Supabase table by bare name in security/supabase-rls #2103 (#2177)
  test(rules): every site rule emits a check on a clean site, with a shrinking baseline #1741 (#2179)
  feat(rules): report each 5xx page as its own crawl/server-errors finding #2130 (#2181)
  fix(rules): one finding per leaked field across json-sensitive-fields and auth-endpoint-disclosure, deduped by the runner #2083 (#2154)
  fix(cli): report --input keeps meta.partialAudit and publishes with it #2102 (#2153)
  fix(cli): local incremental re-audit counts carried findings in the full audit's check units (#2159)
  fix(crawler): cap stored entity refs and edges, skip corrupt refs rows #2135 (#2158)
  fix(crawler): a quick crawl fetches the start URL when a sitemap lists it past maxPages #2127 (#2157)
  fix(rules): security/exposed-actuator reads a 5xx through isUnverifiedReply, never part of a pass #2101 (#2151)
  fix(rules): hold large text to 3:1 in a11y/color-contrast #2105 (#2155)
  fix(cli): size the report list date column from rendered dates #2095 (#2152)

Signed-off-by: Nik Cubrilovic <[email protected]>
nc9 added a commit that referenced this pull request Nov 21, 2026
* origin/main:
  test(audit-engine): carriedCheckAsFailure keeps the continuation mark #2098 (#2166)
  fix(rules): correct zoom-disabled 1.4.4 wording, related criteria for wcagNone rules #2115 (#2174)
  refactor(cli): list bash completion flags one per line #2116 (#2175)
  feat(rules): waive a public Supabase table by bare name in security/supabase-rls #2103 (#2177)
  test(rules): every site rule emits a check on a clean site, with a shrinking baseline #1741 (#2179)
  feat(rules): report each 5xx page as its own crawl/server-errors finding #2130 (#2181)
  fix(rules): one finding per leaked field across json-sensitive-fields and auth-endpoint-disclosure, deduped by the runner #2083 (#2154)
  fix(cli): report --input keeps meta.partialAudit and publishes with it #2102 (#2153)
  fix(cli): local incremental re-audit counts carried findings in the full audit's check units (#2159)
  fix(crawler): cap stored entity refs and edges, skip corrupt refs rows #2135 (#2158)
  fix(crawler): a quick crawl fetches the start URL when a sitemap lists it past maxPages #2127 (#2157)
  fix(rules): security/exposed-actuator reads a 5xx through isUnverifiedReply, never part of a pass #2101 (#2151)
  fix(rules): hold large text to 3:1 in a11y/color-contrast #2105 (#2155)
  fix(cli): size the report list date column from rendered dates #2095 (#2152)

Signed-off-by: Nik Cubrilovic <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a11y/color-contrast: large text is held to 4.5:1 instead of WCAG's 3:1

1 participant