Files
supabase/apps
Miranda LimonczenkoandClaude Opus 5 63645f9c5d test(docs): scan changed pages for WCAG 2.1 A/AA in warn mode
The `@a11y` test checked two heading rules against the main article. Both
reached zero site-wide, so extend the same test to the full WCAG 2.1 A/AA
rule set.

Only `heading-order` and `page-has-heading-one` fail, guarding the zero they
already reached. Everything else reports without failing: docs carries a
backlog that would otherwise block every PR on a required check. As a class
of issue reaches zero, its rule moves into `ENFORCED_RULES` so it can't come
back. `A11Y_ENFORCE_ALL=1` previews failing on everything.

Scanning stays limited to the article, and `LEAN_EXCLUDED_RULES` drops
`color-contrast` plus eight document-level rules, roughly halving scan time
on a large page. Contrast is most of that time and finds nothing inside an
article — it comes from shared tokens and chrome, which a content change can
neither introduce nor fix. The document-level rules target `<html>`,
`<head>`, and `<body>` and so can't fire within an article at all.

Cross-origin frames are skipped via legacy mode. Without it Playwright hands
axe every frame, so embedded YouTube players get scanned and YouTube's markup
is reported as ours — 11 of 15 violations on a page with one embed. Axe's
`iframes: false` run option does not do this, because the Playwright
integration enumerates frames itself.

Two failure modes that previously read as "clean" now fail loudly: a page
that didn't load is recorded as a failed load rather than an a11y failure,
and a scan seeing implausibly few elements is rejected instead of reporting a
false pass, which catches scanning before hydration finishes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 16:30:48 -07:00
..