Pattern #43 · Design experiments

AI-generated forms and WCAG: does asking for accessibility help or add bad ARIA?

Mostly it adds ARIA. The spec has a word for that kind: unnecessary.

Track Cwcagariaaccessibilityai-codegendesign-experiments

Do

Ask for WCAG 2.2 AA, then audit the ARIA: here the sentence fixed every structural miss on the weaker model and cost nothing on the stronger one.

Don't

Don't read 16 ARIA attributes per form as rigor. All 94 misuse flags landed in the WCAG condition; 91 were aria-required duplicating required.

Question. Does adding one sentence, "The form must meet WCAG 2.2 Level AA", to a form-generation prompt reduce automatically detectable accessibility violations, or does it mostly add ARIA, including the kind a rule-based check flags as misused?

Test. Three constructed form briefs (event registration, job application, support request), two prompt conditions identical except that one sentence, 10 generations per cell on two Claude models: 120 of 120 runs delivered, preregistered and fully logged (Progressive Disclosure, 2026). Every form was scanned with axe-core 4.14.0 and checked against five preregistered ARIA misuse rules.

Observed difference. Unprompted forms were already nearly clean: 29 of 30 on the larger model and 26 of 30 on the smaller had zero axe violations. The WCAG sentence took the smaller model to 30 of 30 (its baseline misses were page structure; Mann-Whitney p = 0.04) and changed nothing on the larger one. What it reliably changed was volume: ARIA attributes and roles per form jumped from 0.7 to 16.2 on one model and from 0.9 to 11.8 on the other. All 94 misuse flags landed in the WCAG condition, zero in baseline: 91 aria-required attributes duplicating the native required, which ARIA in HTML calls unnecessary with potential unintended consequences (W3C, 2026), 3 references to ids that do not exist, and one new critical axe violation, aria-required on a fieldset.

Limit. Simple constructed briefs and two models in one agent harness. axe-core sees only machine-checkable rules; most WCAG criteria still need a human. Redundant aria-required is a maintenance hazard rather than a user-facing failure, and nothing here measures assistive technology experience in practice.

Takeaway. Keep the sentence, then audit the ARIA it buys you. It fixed real structural misses on the weaker model and cost nothing on the stronger one, but its main output was attributes the spec calls unnecessary, with the occasional broken reference. The W3C's standing principle covers the rest: No ARIA is better than Bad ARIA (W3C WAI, n.d.). In the wild, pages with ARIA average 59.1 detected errors against 42 without (WebAIM, 2026); generated forms now ship with that pattern preinstalled.

Experiment record (essentials)

Preregistered 2026-10-22 before the first model call (protocol.json, sha256 63861b16d54f6b7adb3ece29fdffe2503da68b4d68bfc41af48320f4939f8c9b). Conditions: 2 Claude models (harness aliases sonnet and haiku, Claude Agent SDK subagents, provider default sampling; exact snapshot IDs not exposed) x 3 briefs x 2 prompt conditions x 10 generations = 120 runs, one isolated subagent call each, no shared state; 120 of 120 delivered, zero retries. Scoring: axe-core 4.14.0 in headless Chromium via Playwright 1.64.1 plus five preregistered ARIA checks (M1 redundant role, M2 redundant state, M3 broken reference, M4 aria-hidden on focusable, M5 conflicting name); every M3 flag and the single new axe violation re-read in source, M2 spot-checked across both models. Baseline axe failures: smaller model region 18 nodes, landmark-one-main 3, color-contrast 1; larger model color-contrast 1. WCAG condition: smaller model 0 violations in 30 of 30; larger model 29 of 30 with the one failure introduced by added ARIA (aria-required on a fieldset, axe impact critical). Misuse by condition: baseline 0 and 0; WCAG 74 (larger) and 20 (smaller), of which 91 of 94 are aria-required plus required. Full numbers in results.json; raw outputs, prompts, delivery log and scoring scripts stored alongside. No human participants; no claims about user behavior or assistive technology experience.

References

  1. 01

    Progressive Disclosure. (2026, October 22). Pattern 43 experiment record: preregistered protocol, 120 generated forms, axe-core scans, ARIA checklist, scoring scripts, and results. Stored with the pattern in experiments/43-ai-generated-forms-wcag.

  2. 02

    W3C Web Accessibility Initiative. (n.d.). Read me first. ARIA Authoring Practices Guide. Retrieved October 22, 2026, from https://www.w3.org/WAI/ARIA/apg/practices/read-me-first/

    https://www.w3.org/WAI/ARIA/apg/practices/read-me-first/
  3. 03

    W3C. (2026, August 11). ARIA in HTML (W3C Recommendation). https://www.w3.org/TR/html-aria/

    https://www.w3.org/TR/html-aria/
  4. 04

    WebAIM. (2026). The WebAIM Million: The 2026 report on the accessibility of the top 1,000,000 home pages. https://webaim.org/projects/million/

    https://webaim.org/projects/million/