Master

A policy that survives the next release

Accessibility work stops being a project when it becomes a rule that runs on every release. The rule is one gate command with a non-zero exit, plus a written record of what was tested, so the next person does not have to ask whether it was tested at all.

What you will see

A dated line naming who reviewed the names. A pass with no reviewer is an unreviewed pass.

About 1 min of reading

Try It

Wire the gate into the release ritual

1

Write the gate

printf '#!/bin/sh\nset -e\nfor p in $(node tmp/crawl_all.js); do\n c=$(curl -s "http://localhost:3000$p")\n i=$(echo "$c" | grep -oE "

Before you run it, say out loud what it will print. Then open the answer.

What it prints
An executable gate that fails on the first page with an image missing alt.
2

Run it

./a11y-gate.sh; echo "exit=$?"

Before you run it, say out loud what it will print. Then open the answer.

What it prints
exit=0 across the site. Any non-zero names the page and must be fixed before publish.
3

Add it to the release gate

grep -c 'a11y-gate.sh' release-gate.sh

Before you run it, say out loud what it will print. Then open the answer.

What it prints
At least 1. The accessibility check runs as part of the release, not as a separate optional step.
4

Record the run

printf '%s a11y-gate exit=0, screen reader reviewed by %s\n' "$(date +%F)" "$(git log -1 --format=%an)" | tee -a docs/a11y-log.md

Before you run it, say out loud what it will print. Then open the answer.

What it prints
A dated line naming who reviewed the names. A pass with no reviewer is an unreviewed pass.
Do not let the gate exit 0 when it crawled zero pages. Assert the page count is above a floor, or the gate passes silently on an empty crawl.

Data Flow

Release to a recorded verdict
1 Build the release
↓
2 Run the mechanical gate across pages
↓
3 Run the manual six checks on the changed pages
↓
4 Compare failure count to the previous release
↓
5 Record the verdict and publish
Why this works
The one rule that makes it stick

No release publishes without the gate having run and passed. Everything else is a detail; a release that skipped the gate is a release that must be reopened.

Where the policy needs a human

Names, order, and whether an alternative text is the right fact. The gate cannot decide those, so the record must name who reviewed them.

Examples

The gate is a command

The record names the tool and the run

A line per release: which checks ran, which technology, which date. Without it, a future reader cannot tell whether a pass was measured or assumed.

New code must not regress the count

Compare the failure count to the previous release. A release that adds a new failure is blocked, even if it fixed two older ones.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← Auditing a whole site, not one page
Previous Lesson
Auditing a whole site, not one page