An open API service indexing awesome lists of open source software.

https://github.com/mgifford/wcag-spine

Visualization of WCAG 2.2 AA for automated and manual tests.
https://github.com/mgifford/wcag-spine

accessibility automated-testing axe-core manual-testing w3c wcag

Last synced: 17 days ago
JSON representation

Visualization of WCAG 2.2 AA for automated and manual tests.

Awesome Lists containing this project

README

          

# WCAG Spine

> An interactive GitHub Pages dashboard that visualises the "Mirror Spine" of
> WCAG 2.2 โ€” bridging Responsibility (ARRM) and Technical Testing
> (ACT, Axe-core, Alfa, Trusted Tester) for every Success Criterion.

[![Sync Accessibility Data](https://github.com/mgifford/wcag-spine/actions/workflows/sync_accessibility.yml/badge.svg)](https://github.com/mgifford/wcag-spine/actions/workflows/sync_accessibility.yml)

---

> [!WARNING]
> **๐Ÿšง Experimental โ€” AI-assisted code, not yet fully validated**
>
> The **code** for this site (HTML/CSS/JS frontend, Python data-pipeline, CI workflows,
> and documentation) was largely written with AI assistance. The **source data** โ€” WCAG
> 2.2 Success Criteria, ACT Rules, Axe-core/Alfa rule IDs, ARRM roles, and Trusted
> Tester steps โ€” comes directly from authoritative W3C and DHS sources (see
> [Data Sources](#data-sources-) below) and is **not** AI-generated.
>
> Automated tests (Playwright + Axe-core, Lighthouse CI, and Python unit tests) run on
> every commit and are listed in [Testing & Accessibility Audits](#testing--accessibility-audits).
> However, the full codebase has **not** yet received a comprehensive human code review,
> and real-world edge cases may not be covered. Use with appropriate caution.
>
> - Impacts may vary significantly depending on where and how the tool is implemented.
> - People with experience conducting studies on accessibility impact and the cost of
> AI cycles should be involved in any evaluation or adoption decisions.
> - **Please provide feedback in the
> [issue queue](https://github.com/mgifford/wcag-spine/issues)** if you have
> positive or negative results from using this tool. Include links and references so
> that claims can be discussed and verified.

---

## Live Demo #

**[mgifford.github.io/wcag-spine](https://mgifford.github.io/wcag-spine)**

Deep-link directly to any SC:

```
https://mgifford.github.io/wcag-spine/#2.4.11
```

---

## What It Shows #

For every WCAG 2.2 Success Criterion (1.1.1 โ†’ 4.1.3) the dashboard renders a
"vertebra" โ€” a three-part view of:

| Side | Content |
|------|---------|
| **Centre** (spine) | SC number, title, conformance level |
| **Left** ๐Ÿค– Automation | ACT Rule IDs ยท Axe-core rule IDs ยท Alfa rule IDs |
| **Right** ๐Ÿ‘ค Human | ARRM responsibility roles ยท Trusted Tester procedure steps |

### Five views #

| View | Description |
|------|-------------|
| **Cards** | Responsive card grid โ€” the default view |
| **Spine** | Interactive HTML/CSS "vertebra" graph |
| **Table** | Sortable/scannable data table |
| **ACT Rules** | Browse by ACT rule ID, showing engine implementations |
| **Coverage** | Automation coverage statistics and testing methodology |

### Filters #

- **Level** โ€” A / AA / AAA
- **Role** โ€” filter by ARRM responsibility (e.g. *Visual Design*)
- **Automation** โ€” Any ยท Partial ยท Full (all 3 engines) ยท None (0%)
- **Search** โ€” free-text search on SC number or keyword

---

## Repository Structure #

```
wcag-spine/
โ”œโ”€โ”€ index.html # GitHub Pages entry point
โ”œโ”€โ”€ assets/
โ”‚ โ”œโ”€โ”€ css/style.css # Dashboard styles
โ”‚ โ””โ”€โ”€ js/app.js # Frontend logic (filtering, spine generation, routing)
โ”œโ”€โ”€ data/
โ”‚ โ””โ”€โ”€ master_spine.json # Merged WCAG 2.2 data (auto-updated daily)
โ”œโ”€โ”€ scripts/
โ”‚ โ””โ”€โ”€ sync_data.py # Python data orchestrator
โ”œโ”€โ”€ testing-methods.md # Testing methodology & resource documentation
โ”œโ”€โ”€ .github/
โ”‚ โ””โ”€โ”€ workflows/
โ”‚ โ””โ”€โ”€ sync_accessibility.yml # Daily sync + GitHub Pages deploy
โ”œโ”€โ”€ pyproject.toml # Python project metadata + dev dependencies (uv)
โ””โ”€โ”€ requirements.txt # Legacy pip-compatible dev dependency list
```

---

## Data Sources #

| Source | URL | Machine-readable |
|--------|-----|-----------------|
| W3C ARRM (roles & tasks) | https://github.com/w3c/wai-arrm/tree/draft/_data/arrm | โœ” CSV |
| ACT Rules Mapping (W3C GitHub) | https://github.com/w3c/wcag-act-rules/blob/main/wcag-mapping.json | โœ” JSON |
| ACT Rules Registry (human-readable) | https://www.w3.org/WAI/standards-guidelines/act/rules/ | โœ˜ HTML only |
| EARL ACT document | https://github.com/w3c/wcag-act/blob/main/earl-act.json | โœ” JSON-LD |
| ACT Tools | https://github.com/act-rules/act-tools/ | โœ” (library) |
| Axe-core Rules | https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md | โœ˜ Markdown |
| Alfa Rules (Siteimprove) | https://github.com/siteimprove/alfa/blob/main/packages/alfa-rules/README.md | โœ˜ Markdown |
| DHS Trusted Tester | https://section508.gov/test/trusted-tester/ | โœ˜ HTML only |

---

## Running the Sync Script Locally #

```bash
# Install Python tooling (pytest, etc.) with uv
uv sync --group dev

# No third-party runtime dependencies โ€” sync_data.py uses only the Python standard library
uv run python scripts/sync_data.py
```

The script:
1. Downloads the latest ARRM CSV and ACT Rules mapping JSON from W3C / GitHub.
2. Merges them by SC number into `data/master_spine.json`.
3. Prints a summary of how many mappings were updated.

---

## master_spine.json Schema #

```json
{
"meta": {
"generated": "2026-03-05",
"wcag_version": "2.2",
"sources": { "...": "..." }
},
"success_criteria": {
"2.4.11": {
"title": "Focus Not Obscured (Minimum)",
"level": "AA",
"principle": "Operable",
"url": "https://www.w3.org/WAI/WCAG22/Understanding/focus-not-obscured-minimum.html",
"automation": {
"act": ["04639e"],
"axe": ["focus-not-obscured"],
"alfa": ["SIA-R109"]
},
"manual": {
"roles": ["UX Design", "Front-End Development"],
"tt_steps": ["2.4.11.A - Focus Visibility with Sticky Headers", "2.4.11.B - Focus with Overlays"]
}
}
}
}
```

---

## GitHub Pages Setup #

1. Go to **Settings โ†’ Pages**.
2. Set **Source** to *GitHub Actions*.
3. Push to `main` โ€” the workflow deploys automatically.

The daily `sync_accessibility.yml` workflow also re-deploys after updating
`master_spine.json`.

---

## Contributing #

Pull requests are welcome! To add or correct a rule mapping:

1. Edit `data/master_spine.json` directly, **or**
2. Update `scripts/sync_data.py` if the source data format changes.

---

## Testing & Accessibility Audits
To maintain our commitment to WCAG 2.2 AA, developers must run local audits:

1. **Install tools**: `npm install`
2. **Run All Audits**: `npm run test:a11y`
- Runs **Playwright + Axe-core** in both Light and Dark modes.
- Runs **Lighthouse CI** to ensure an accessibility score of 100%.

---

## AI Disclosure #

Transparency about AI use is a core commitment of this project. Below is a record of every AI tool
that has been used, and how it was used. If you contribute using an AI tool, please add it to this
table (see [`AGENTS.md`](AGENTS.md) for instructions).

### What AI did โ€” and did not โ€” generate

To answer the natural question *"which parts of this project are AI-generated?"*:

| Layer | AI-generated? | Notes |
|-------|:---:|-------|
| **Source data** (WCAG 2.2 SCs, ACT Rules, Axe-core/Alfa IDs, ARRM roles, Trusted Tester steps) | โŒ No | Fetched directly from authoritative W3C and DHS sources by the sync script |
| **Data-pipeline code** (`scripts/sync_data.py`, CI workflows) | โœ… Yes | Written with AI assistance; covered by Python unit tests in `tests/` |
| **Frontend code** (`index.html`, `assets/js/app.js`, `assets/css/style.css`) | โœ… Yes | Written with AI assistance; covered by Playwright + Axe-core + Lighthouse CI |
| **Documentation** (`README.md`, `ACCESSIBILITY.md`, `AGENTS.md`, etc.) | โœ… Yes | Authored with AI assistance; reviewed and edited by the project maintainer |

### Human review & testing

The following safeguards are in place for AI-generated code:

- **Automated CI** runs on every commit: Playwright + Axe-core (0 violations required), Lighthouse CI (100% accessibility score required), and Python unit tests (`uv run python -m pytest` / `python3 -m pytest`).
- **Daily data sync** re-runs `sync_data.py` against live W3C/DHS endpoints and redeploys; failures are visible in the [Actions tab](https://github.com/mgifford/wcag-spine/actions).
- **Maintainer review** โ€” all AI-generated PRs are reviewed by the project maintainer before merging.
- **Not yet fully audited** โ€” a comprehensive independent human code review of the full codebase has not yet been completed. Contributions and reviews are welcome via the [issue queue](https://github.com/mgifford/wcag-spine/issues).

### AI tools used in development

| Tool | Layer(s) affected | Role |
|------|:---:|------|
| **GitHub Copilot** (Coding Agent / `copilot-swe-agent`) | Frontend ยท Data pipeline ยท Documentation | Code generation, documentation authoring, PR automation, and project scaffolding throughout the build of this project |
| **Antigravity** (AI Coding Assistant) | Frontend ยท Data pipeline | Removal of MermaidJS dependency; Implementation of pure HTML/CSS Spine View and data flow visualisations; Implementation of live Trusted Tester v5 scraper and data provenance source badges; Implementation of theme-aware (Light/Dark) accessibility CI/CD pipeline (Playwright + Axe-core + Lighthouse); Remediation of WCAG 2.2 AA violations (contrast, nested interactive, target-size) |
| **Claude Sonnet** (GitHub Copilot Task Agent / `claude-sonnet-4.5`) | Data pipeline | Fixed false-positive WCAG 3.0 Recommendation check in `scripts/check_updates.py` โ€” added `fetch_content_snippet()` helper and updated `check_wcag30()` to verify "W3C Recommendation" in page content rather than relying solely on HTTP 200; updated unit tests accordingly |
| **GitHub Copilot Task Agent** | Documentation ยท Build tooling ยท Governance | Authored `DEFINITION_OF_DONE.md`; updated README cross-references and AI disclosure; migrated Python project management to `uv` via `pyproject.toml`; and updated `AGENTS.md` security requirements plus authored `SBOM.md` for dependency/version/license inventory documentation |

### Runtime AI

**None.** The dashboard is a fully static site. When a user opens the application, no LLM or
AI API is called. All data is pre-built by the daily CI sync script and served as a static JSON
file (`data/master_spine.json`).

### Browser-based AI

**None.** No on-device or browser-based AI features are present. The frontend (`app.js`) does not
load any AI SDK, call any inference endpoint, or delegate any logic to a browser AI API.

---

## Documentation #

| [`testing-methods.md`](testing-methods.md) | Testing methodology, resource links, and coverage gap analysis |
| [`ACCESSIBILITY.md`](ACCESSIBILITY.md) | Project accessibility commitments |
| [`DEFINITION_OF_DONE.md`](DEFINITION_OF_DONE.md) | Definition of done checklist for report-quality documentation |
| [`SBOM.md`](SBOM.md) | Software bill of materials for repository tooling, dependencies, and licenses |

---

## License #

[GNU Affero General Public License v3.0](LICENSE) ยท Data sourced from W3C (CC BY 4.0) and open-source projects. See [`SBOM.md`](SBOM.md) for component-level version and license details, including manifest metadata that differs from the repository license file.