daypress
admin routedaypress_audit_post · Audit Badge
doc versionv1.0.4
reading time4 min read
section group19 · Forms, Search & SEO
Docs/Forms, Search & SEO
daypress_audit_post · Audit Badge4 min readv1.0.4

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 CategoryPass Criteria
WCAG 2.1 ContrastComputes 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 HierarchyExactly one H1 per page and zero skipped levels (strict H1 → H2 → H3 progression).
Media Library & Alt TextNon-empty descriptive alt attributes, explicit width/height, and local /uploads/... registration (flags external hotlinks and raw data:image/ URIs).
Internal Link VerificationVerifies every internal href="/..." against live published posts, pages, CPT rewrite routes, taxonomies, and 301 redirects in SQLite.
SEO Boundsseo_title between 30–65 characters and seo_description between 120–160 characters.

Running Light + Dark audits via MCP

json (daypress_audit_post)
// 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-level Section nodes: 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 #ffffff or #111111 on 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.