<!-- example:accessibility-migration -->
# Accessibility migration specification example

A change-by-change plan for moving an existing interface toward approved accessibility rules.

- [HTML version](https://specifica.org/examples/accessibility-migration/)
- [Specifica format](https://specifica.org/format.md)
- Reference template: not a built-in Playground starter

## spec.md

### Requirements

- [ ] Every in-scope page has a baseline of known issues, affected elements and relevant success criteria.
- [ ] The product owner approves the accessibility rules and target criteria before fixes begin.
- [ ] Every interactive control exposes the approved accessible name and role.
- [ ] Text and controls meet the contrast ratio approved for their content and size.
- [ ] Informative images and media have an approved text alternative; decorative images are ignored by assistive technology.
- [ ] Every accessibility fix is re-checked against the rule it is intended to meet.
- [ ] A judgment call is routed to its named design or content owner; it is never silently guessed.
- [ ] Every accepted fix keeps the page, element, rule, before state, after state and re-check result.

### Edge Cases

- A button has no accessible name → mark the name-and-role rule not met and send the change back.
- Text contrast is 3.1:1 where the approved rule requires 4.5:1 → mark it not met and retain the measured values.
- The purpose of an image is ambiguous → route the alternative-text decision to the content owner.
- A check family has no declared coverage for a rule → record it as not declared; do not infer a pass.
- A fix passes an automated check but changes the intended wording or interaction → route it for human review.

## design.md

### Flow

1. Render and inventory the exact version of every in-scope page.
2. Record baseline issues by page, element and criterion.
3. Approve the accessibility rules and name decision owners.
4. An agent drafts one focused fix.
5. The loop checks the changed page against the approved rule.
6. A missed rule goes back with evidence; a judgment call goes to its owner.
7. A passing fix keeps the baseline, change and re-check result with the pull request.

### Decisions

- Fixes are small enough to attribute a changed result to one pull request.
- Browser, viewport, page state and check versions are pinned for every re-check.
- Production release remains with the delivery team; this loop stops at reviewed evidence.

## tasks.md

### Migration order

- [ ] Inventory pages, states, components and decision owners
- [ ] Record the baseline with pinned browser and check versions
- [ ] Approve rules for names, roles, contrast, structure and alternatives
- [ ] Prioritize issues by user path and agreed severity
- [ ] Draft one focused fix per change
- [ ] Re-check each fix and correct rules that are not met
- [ ] Route wording, visual and interaction judgments to their owners
- [ ] Attach the before, after and re-check evidence to each passing pull request
- [ ] Repeat the baseline after the migration wave

Optional workflow reference: [Cognium Autonomous Loop](https://cognium.net/how-it-works/). Related applied workflow: [Accessibility](https://cognium.net/packs/accessibility/).
