WCAG 2.1 AA/AAA Contrast, Heading, Media & Link Linter
Built directly into DayStudio's topbar shield and the daypress_audit_post MCP tool, Daypress's deterministic quality linter scores every page from 0 to 100 across accessibility, media hygiene, link integrity, and SEO.
What the 0–100 quality audit verifies
| Check Category | Pass Criteria |
|---|---|
| WCAG 2.1 Contrast | Computes W3C relative luminance across inherited container backgrounds and CSS variables (var(--ink), var(--paper)), enforcing >= 4.5:1 for normal text and >= 3.0:1 for large headings (>= 24px or bold >= 19px). |
| Heading Hierarchy | Exactly one H1 per page and zero skipped levels (strict H1 → H2 → H3 progression). |
| Media Library & Alt Text | Non-empty descriptive alt attributes, explicit width/height, and local /uploads/... registration (flags external hotlinks and raw data:image/ URIs). |
| Internal Link Verification | Verifies every internal href="/..." against live published posts, pages, CPT rewrite routes, taxonomies, and 301 redirects in SQLite. |
| SEO Bounds | seo_title between 30–65 characters and seo_description between 120–160 characters. |
Running Light + Dark audits via MCP
// Always audit both palettes when using dual-theme DaystudioKit tokens!
// 1. Daylight palette check
{"post_id": 10, "theme": "light"}
// 2. Night ([data-theme="dark"]) palette check
{"post_id": 10, "theme": "dark"}Fixing common contrast & dark-mode pitfalls
- Always set explicit
background_color: "var(--paper)"on top-levelSectionnodes: Omitting a section background causes dark-mode audits to fall back to the dark root surface while comparing against light tokens if custom variables aren't bound. - Avoid hardcoded
#ffffffor#111111on prose cards: Reference semantic tokens (var(--paper),var(--paper-raised),var(--ink),var(--ink-muted)) or use DayStudio's 1-click Auto-Fix button in the Audit drawer.