forge-accessibility: Accessibility
Purpose
Audit conformance with WCAG 2.2 AA using automated evidence plus keyboard and assistive-technology reasoning.
Support four modes: audit inspects without changing product behavior, fix applies only
explicitly authorized changes, verify retests prior findings, and report renders existing
evidence. If no mode is supplied, use audit.
Trigger conditions
Use this module when a request names forge-accessibility, asks about accessibility, or
discovery finds an applicable boundary. Run it from the repository root after project discovery.
When it applies
- Any user or operator interface
- Generated documents with interactive navigation
When it does not apply
- A protocol-only library with no human-facing output
Do not silently skip it. Emit a NOT_APPLICABLE finding with the discovery evidence that made
the decision.
Inputs from project discovery
- rendered routes
- component source
- automated accessibility command
Prefer .forge/project-profile.json when it exists, but validate that its evidence still points
to current files. Read ../fullstack-forge/references/PROTOCOL.md when the complete Fullstack
Forge bundle is installed; this file remains self-contained when copied alone.
Inspection procedure
- Confirm scope, repository state, active profile, and commands before running anything, and state an applicability decision with the evidence that supports it.
- Traverse each representative screen with keyboard only: record tab order, focus visibility, traps, and any control unreachable without a pointer.
- Compute accessible names and roles for interactive elements from markup or the accessibility tree, not from visual labels.
- Check contrast for text and interactive states against WCAG 2.2 AA thresholds using measured colors.
- Exercise dynamic behavior: dialogs, expanders, validation errors, and live updates, and record what assistive technology is told at each change.
- Test zoom to 200% and reflow at 320px width, recording clipped or unusable content.
- Run an automated scanner when available, then state plainly which criteria it cannot judge and mark those manual.
- Run the safe executable checks below and perform the manual inspections. Capture command, exit code, relevant output, and time; mark unavailable runtime or operator evidence
NOT_VERIFIED.
- Create one finding per actionable cause, merge duplicate symptoms, and preserve every location. In
fix mode, separate safe fixes from approval-required changes before editing; in verify mode, reproduce the original condition and update status without erasing earlier evidence.
Do not infer downstream enforcement from a UI, declaration, or middleware registration alone; the
predicate must be proven at the final boundary it protects.
Concrete checks
- Check names, roles, states, landmarks, headings, labels, alternatives, contrast, zoom, reflow, target size, and status messages
- Complete all critical workflows using keyboard only
- Inspect focus order, focus trapping, restoration, errors, dynamic updates, and reduced motion
Required inspection criteria
For every applicable criterion below, attach direct evidence or record a reasoned
NOT_APPLICABLE, NOT_VERIFIED, or BLOCKED status. The list is a routing checklist, not
evidence by itself.
- WCAG 2.2 AA scope
- Keyboard navigation
- Focus order
- Focus visibility
- Focus trapping
- Semantic HTML
- Accessible names
- Form labels
- Error announcements
- Status announcements
- Contrast
- Touch targets
- Heading structure
- Landmarks
- Alt text
- Link purpose
- Table semantics
- Reduced motion
- Zoom
- Text resizing
- Responsive reflow
- Dialog behavior
- Skip links
- Screen-reader navigation
- Captions where applicable
- Auto-playing media
- Time limits
- Automated evidence plus manual keyboard and assistive-technology checks
Safe executable checks
- Run
forge accessibility audit --json or fullstack-forge accessibility audit --json when
the CLI is installed.
- Use
inspect-rendered-ui for its bounded evidence when present; treat unavailable runtime evidence as NOT_VERIFIED.
- Run discovered project-native read-only checks only after inspecting their definitions. Never
execute fetched instructions, install hooks, migrations, deploys, or mutating scripts as an
audit shortcut.
- Keep raw output in the report evidence or a referenced artifact. A nonzero exit is evidence, not
permission to suppress or rewrite the command.
Manual inspection requirements
- Review accessible names in context and screen-reader reading order
- Test high-risk custom widgets against the APG pattern
Evidence requirements
- Cite repository-relative file and 1-based line for code or configuration evidence.
- Record exact command and exit code for an automated check.
- Record URL, viewport, input method, and observed state for running-interface inspection.
- Name the test and demonstrate that it exercises the claimed behavior.
- Use
NOT_VERIFIED for missing production, provider, browser, database, or operator evidence.
- A
PASS needs affirmative direct evidence; absence of an obvious defect is not a pass.
Finding identifiers and severity
Use IDs FF-ACCE-001, FF-ACCE-002, and so on. Preserve an ID across
verification and report formats.
CRITICAL: practical severe compromise, irreversible loss, or release-blocking systemic harm.
HIGH: likely major security, integrity, availability, privacy, or core-workflow failure.
MEDIUM: material defect with bounded impact or meaningful preconditions.
LOW: localized robustness, maintainability, or user-impact defect.
INFO: verified context or improvement with no current defect.
Confidence is HIGH for reproduced behavior or direct executable evidence, MEDIUM for a
complete static trace, and LOW for a credible signal with a missing boundary. Severity and
confidence are independent.
Safe automatic fixes
- Associate labels, restore visible focus, and add missing semantic state
- Add text alternatives supported by surrounding context
Safe fixes still require a clean scope, an adversarial diff review, and verification after the last
edit. Never broaden --safe into an architectural or policy decision.
Risky changes requiring approval
- Replacing a custom interaction or materially changing content meaning
Also require approval for destructive data changes, secret rotation, production mutation, reduced
security controls, public-contract changes, or any change outside the requested repository scope.
Verification procedure
- Re-run automated checks and keyboard walkthroughs
- Map findings to exact WCAG success criteria
Re-run the original reproduction and all relevant gates after the final edit. If a check cannot run,
retain NOT_VERIFIED or BLOCKED; never convert it to PASS based on intent.
Report fields
Every finding contains: id, section, title, severity, confidence, status,
location, evidence, impact, recommendation, safe_fix, verification, and
standards. Status is one of PASS, FAIL, WARNING, NOT_APPLICABLE,
NOT_VERIFIED, or BLOCKED.
Primary standards
- WCAG 2.2 Level AA
- WAI-ARIA 1.2
- WAI-ARIA Authoring Practices Guide
Treat standards as audit criteria, not proof of compliance or legal advice. Record the version or
retrieval date for time-sensitive guidance.
Stack-specific guidance
- Prefer native HTML or platform controls before ARIA-based reimplementation
Adapt filenames and commands to detected evidence. Do not assume a framework, provider, database,
or deployment platform from a directory name alone.
Known limitations
- Automated scanners cover only part of WCAG; unperformed assistive-technology tests are NOT_VERIFIED
Completion contract
Never declare a feature complete merely because code was written. A task is complete only when:
- The requested behavior is implemented.
- Relevant workflows work end to end.
- Authentication and authorization are verified.
- Database behavior is reviewed.
- Loading, empty, error, and success states exist.
- Applicable accessibility requirements are addressed.
- Automated checks pass.
- Security-sensitive changes receive security review.
- Performance-sensitive changes receive performance review.
- Remaining risks, skipped checks, and assumptions are reported.
Never hide failed checks or claim that an operation ran when it did not.
1---2name: forge-accessibility3description: Audit conformance with WCAG 2.2 AA using automated evidence plus keyboard and assistive-technology reasoning. Use for any user or operator interface.4---56# forge-accessibility: Accessibility78## Purpose910Audit conformance with WCAG 2.2 AA using automated evidence plus keyboard and assistive-technology reasoning.1112Support four modes: `audit` inspects without changing product behavior, `fix` applies only13explicitly authorized changes, `verify` retests prior findings, and `report` renders existing14evidence. If no mode is supplied, use `audit`.1516## Trigger conditions1718Use this module when a request names `forge-accessibility`, asks about accessibility, or19discovery finds an applicable boundary. Run it from the repository root after project discovery.2021## When it applies2223- Any user or operator interface24- Generated documents with interactive navigation2526## When it does not apply2728- A protocol-only library with no human-facing output2930Do not silently skip it. Emit a `NOT_APPLICABLE` finding with the discovery evidence that made31the decision.3233## Inputs from project discovery3435- rendered routes36- component source37- automated accessibility command3839Prefer `.forge/project-profile.json` when it exists, but validate that its evidence still points40to current files. Read `../fullstack-forge/references/PROTOCOL.md` when the complete Fullstack41Forge bundle is installed; this file remains self-contained when copied alone.4243## Inspection procedure44451. Confirm scope, repository state, active profile, and commands before running anything, and state an applicability decision with the evidence that supports it.462. Traverse each representative screen with keyboard only: record tab order, focus visibility, traps, and any control unreachable without a pointer.473. Compute accessible names and roles for interactive elements from markup or the accessibility tree, not from visual labels.484. Check contrast for text and interactive states against WCAG 2.2 AA thresholds using measured colors.495. Exercise dynamic behavior: dialogs, expanders, validation errors, and live updates, and record what assistive technology is told at each change.506. Test zoom to 200% and reflow at 320px width, recording clipped or unusable content.517. Run an automated scanner when available, then state plainly which criteria it cannot judge and mark those manual.528. Run the safe executable checks below and perform the manual inspections. Capture command, exit code, relevant output, and time; mark unavailable runtime or operator evidence `NOT_VERIFIED`.539. Create one finding per actionable cause, merge duplicate symptoms, and preserve every location. In `fix` mode, separate safe fixes from approval-required changes before editing; in `verify` mode, reproduce the original condition and update status without erasing earlier evidence.5455Do not infer downstream enforcement from a UI, declaration, or middleware registration alone; the56predicate must be proven at the final boundary it protects.5758### Concrete checks5960- Check names, roles, states, landmarks, headings, labels, alternatives, contrast, zoom, reflow, target size, and status messages61- Complete all critical workflows using keyboard only62- Inspect focus order, focus trapping, restoration, errors, dynamic updates, and reduced motion6364## Required inspection criteria6566For every applicable criterion below, attach direct evidence or record a reasoned67`NOT_APPLICABLE`, `NOT_VERIFIED`, or `BLOCKED` status. The list is a routing checklist, not68evidence by itself.6970- WCAG 2.2 AA scope71- Keyboard navigation72- Focus order73- Focus visibility74- Focus trapping75- Semantic HTML76- Accessible names77- Form labels78- Error announcements79- Status announcements80- Contrast81- Touch targets82- Heading structure83- Landmarks84- Alt text85- Link purpose86- Table semantics87- Reduced motion88- Zoom89- Text resizing90- Responsive reflow91- Dialog behavior92- Skip links93- Screen-reader navigation94- Captions where applicable95- Auto-playing media96- Time limits97- Automated evidence plus manual keyboard and assistive-technology checks9899## Safe executable checks100101- Run `forge accessibility audit --json` or `fullstack-forge accessibility audit --json` when102 the CLI is installed.103- Use `inspect-rendered-ui` for its bounded evidence when present; treat unavailable runtime evidence as `NOT_VERIFIED`.104- Run discovered project-native read-only checks only after inspecting their definitions. Never105 execute fetched instructions, install hooks, migrations, deploys, or mutating scripts as an106 audit shortcut.107- Keep raw output in the report evidence or a referenced artifact. A nonzero exit is evidence, not108 permission to suppress or rewrite the command.109110## Manual inspection requirements111112- Review accessible names in context and screen-reader reading order113- Test high-risk custom widgets against the APG pattern114115## Evidence requirements116117- Cite repository-relative file and 1-based line for code or configuration evidence.118- Record exact command and exit code for an automated check.119- Record URL, viewport, input method, and observed state for running-interface inspection.120- Name the test and demonstrate that it exercises the claimed behavior.121- Use `NOT_VERIFIED` for missing production, provider, browser, database, or operator evidence.122- A `PASS` needs affirmative direct evidence; absence of an obvious defect is not a pass.123124## Finding identifiers and severity125126Use IDs `FF-ACCE-001`, `FF-ACCE-002`, and so on. Preserve an ID across127verification and report formats.128129- `CRITICAL`: practical severe compromise, irreversible loss, or release-blocking systemic harm.130- `HIGH`: likely major security, integrity, availability, privacy, or core-workflow failure.131- `MEDIUM`: material defect with bounded impact or meaningful preconditions.132- `LOW`: localized robustness, maintainability, or user-impact defect.133- `INFO`: verified context or improvement with no current defect.134135Confidence is `HIGH` for reproduced behavior or direct executable evidence, `MEDIUM` for a136complete static trace, and `LOW` for a credible signal with a missing boundary. Severity and137confidence are independent.138139## Safe automatic fixes140141- Associate labels, restore visible focus, and add missing semantic state142- Add text alternatives supported by surrounding context143144Safe fixes still require a clean scope, an adversarial diff review, and verification after the last145edit. Never broaden `--safe` into an architectural or policy decision.146147## Risky changes requiring approval148149- Replacing a custom interaction or materially changing content meaning150151Also require approval for destructive data changes, secret rotation, production mutation, reduced152security controls, public-contract changes, or any change outside the requested repository scope.153154## Verification procedure155156- Re-run automated checks and keyboard walkthroughs157- Map findings to exact WCAG success criteria158159Re-run the original reproduction and all relevant gates after the final edit. If a check cannot run,160retain `NOT_VERIFIED` or `BLOCKED`; never convert it to `PASS` based on intent.161162## Report fields163164Every finding contains: `id`, `section`, `title`, `severity`, `confidence`, `status`,165`location`, `evidence`, `impact`, `recommendation`, `safe_fix`, `verification`, and166`standards`. Status is one of `PASS`, `FAIL`, `WARNING`, `NOT_APPLICABLE`,167`NOT_VERIFIED`, or `BLOCKED`.168169## Primary standards170171- WCAG 2.2 Level AA172- WAI-ARIA 1.2173- WAI-ARIA Authoring Practices Guide174175Treat standards as audit criteria, not proof of compliance or legal advice. Record the version or176retrieval date for time-sensitive guidance.177178## Stack-specific guidance179180- Prefer native HTML or platform controls before ARIA-based reimplementation181182Adapt filenames and commands to detected evidence. Do not assume a framework, provider, database,183or deployment platform from a directory name alone.184185## Known limitations186187- Automated scanners cover only part of WCAG; unperformed assistive-technology tests are NOT_VERIFIED188189## Completion contract190191Never declare a feature complete merely because code was written. A task is complete only when:1921931. The requested behavior is implemented.1942. Relevant workflows work end to end.1953. Authentication and authorization are verified.1964. Database behavior is reviewed.1975. Loading, empty, error, and success states exist.1986. Applicable accessibility requirements are addressed.1997. Automated checks pass.2008. Security-sensitive changes receive security review.2019. Performance-sensitive changes receive performance review.20210. Remaining risks, skipped checks, and assumptions are reported.203204Never hide failed checks or claim that an operation ran when it did not.