Commit Graph

3 Commits

Author SHA1 Message Date
Daniel Avila a8b8011548 improve: enhance accessibility-tester agent based on automated review (#814)
* improve: enhance accessibility-tester agent based on automated review

- Fix pa11y guidance to use --runner axe (default htmlcs runner is WCAG 2.0-era, misses 2.1/2.2 violations)
- Note axe-core version requirement (>=4.5) for reliable WCAG 2.2 rule coverage
- Annotate which WCAG 2.2 new criteria are actually automatable (only 2.5.8 via axe-core target-size)
- Add a fully worked example finding to anchor severity/remediation phrasing
- Add document/PDF accessibility checklist item (Section 508/EAA scope)
- Add forced-colors / prefers-contrast manual checklist item

Automated review cycle | Co-Authored-By: Claude Code <noreply@anthropic.com>

* fix: cover prefers-contrast alongside forced-colors in accessibility-tester

Addresses review feedback on PR #814 — the manual checklist tested
Windows High Contrast (forced-colors) but omitted the distinct
prefers-contrast media feature, which interfaces can also use for
alternate high-contrast styling.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QTTuf1dEt7QW83eyAPV7Lm

* fix: require both forced-colors and prefers-contrast checks explicitly

The previous wording used "or", allowing an audit to satisfy the
checklist item by testing only one of the two distinct contrast
display modes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QTTuf1dEt7QW83eyAPV7Lm

* fix: correct pa11y WCAG 2.2 coverage claim and axe-core version check scope

pa11y's axe runner maps WCAG2AA to wcag2a/wcag21a/wcag2aa/wcag21aa tags
only (confirmed against pa11y/pa11y#666 and lib/runners/axe.js) — it does
not include wcag22aa, and pa11y has no --tags CLI flag. Also scope the
axe-core version check to the tool actually being run, since
@axe-core/cli --version only reports its own bundled axe-core, not
pa11y's or @axe-core/playwright's independently-resolved versions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QTTuf1dEt7QW83eyAPV7Lm

* fix: give a concrete command for checking per-tool axe-core versions

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QTTuf1dEt7QW83eyAPV7Lm

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-19 10:00:13 -04:00
Daniel Avila 41ac74eaf7 improve: enhance accessibility-tester agent based on automated review (#741)
* improve: enhance accessibility-tester agent based on automated review

- Fix broken automated-scan command: npx axe-core-cli -> npx @axe-core/cli --exit (with WCAG tag flag guidance)
- Correct inaccurate legal-compliance framing; map each framework to its actual referenced WCAG version (Section 508 -> 2.0 AA, ADA Title II/III -> 2.1 AA, EAA/EN 301 549 -> approx 2.1 AA)
- Add Track 1b: scripted keyboard/focus/ARIA-state testing via @axe-core/playwright
- Qualify the automated-coverage statistic (30-40% industry-wide, axe-core ~57%) instead of an unqualified 40%
- Note WCAG 3.0 is still a W3C Working Draft, not expected before ~2029

Automated review cycle | Co-Authored-By: Claude Code <noreply@anthropic.com>

* address review feedback: fix missing AxeBuilder import, stale frontmatter examples

- Add missing `import { AxeBuilder } from '@axe-core/playwright'` to the
  Track 1b code snippet so it's copy-pasteable
- Update the frontmatter description's second example to drop a now-past
  "EAA June 2025 deadline" reference and match the per-framework WCAG
  version mapping already used in the body

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsDjHUg19zLAPpSYuQxH5A

* fix: add missing assertion to Track 1b Playwright example

The snippet collected axe results but never asserted on them, so a
copied test would exit 0 regardless of violations found.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsDjHUg19zLAPpSYuQxH5A

* fix: expand Track 1b withTags to full WCAG 2.0/2.1/2.2 scope

withTags(['wcag22aa']) only activated the 9 new WCAG 2.2 criteria,
silently skipping the WCAG 2.0/2.1 rules that Track 1 already covers
via --tags wcag2a,wcag2aa,wcag21aa,wcag22aa. Align the two tracks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsDjHUg19zLAPpSYuQxH5A

* fix: add missing wcag21a tag to accessibility scan commands

The --tags/withTags lists omitted wcag21a (WCAG 2.1 Level A), causing
axe-core to skip rules like Character Key Shortcuts, Pointer Gestures,
Pointer Cancellation, Label in Name, and Motion Actuation. Applied to
both Track 1 (@axe-core/cli) and Track 1b (@axe-core/playwright).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsDjHUg19zLAPpSYuQxH5A

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-20 10:07:33 -04:00
Daniel Avila e44ddb78ca improve: enhance accessibility-tester agent based on automated review (#546)
- Add correct YAML frontmatter with name, description, tools, and model fields
- Target WCAG 2.2 explicitly with all 9 new criteria listed in reference table
- Mandate hybrid testing methodology (automated + manual) with 40% coverage note
- Restrict tools to Read, Grep, Glob, Bash — no Write/Edit (auditor pattern)
- Set model to sonnet for deep ARIA and compliance reasoning
- Add two example blocks with user/assistant/commentary tags
- Add legal compliance mapping to ADA, Section 508, and EAA (June 2025)
- Add structured finding format with WCAG criterion, severity, remediation, verification
- Add summary scorecard template with severity counts and WCAG 2.2 criterion status
- Add ARIA patterns reference (dialog, combobox, tabs, navigation, live regions)
- Add screen reader test matrix (VoiceOver, NVDA, TalkBack, JAWS)

Automated review cycle | Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-04-26 17:10:24 -04:00