Skip to content

Packs / accessibility-public

alt-text-audit

Audit image alt text across a site or docs folder (HTML and Markdown) and list missing, filename, redundant and overlong alts

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-accessibility-public

Install

logicpacks pack use accessibility-public/alt-text-audit
get_pack accessibility-public/alt-text-audit

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

None.

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: local-python
  • Checks: 1 in outcome/checks.yaml
  • Code: alt_audit.py
  • Tools: python3

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Goal

A CSV of every image with its alt text and a verdict (ok, missing, filename, redundant 'image of', too long > 150 chars, duplicate across different images) so writers can fix them in one pass.

Verified by: Fixture folder: 5 images; each problem type is detected once and the good alt is 'ok'.

Steps

  1. Run python3 code/alt_audit.py content/ > alt-report.csv.
  2. Open in a spreadsheet; write new alt text per the decision tree.
  3. Re-run until no rows are flagged.

Edge cases

  • Markdown reference-style images are not parsed.
  • The same alt for the same image src is fine; only the same alt for different images is flagged.

Don'ts

  • Don't claim WCAG conformance from automated checks alone; automated tools catch roughly a third of issues, so do a manual keyboard and screen-reader pass too.
  • Don't auto-generate alt text and publish without a human reading it.