A1 a11y-lint
Accessibility

Lint your CLI output for accessibility.

Catches inaccessible error messages before they ship — lines too long, ALL-CAPS text, missing context, color-only signals, and jargon without explanation.

Install

pip install a11y-lint

Scan

a11y-lint scan output.txt

Output

[WARN] FMT001: Line exceeds 120 characters Why: Hard to read on magnified displays Fix: Break into multiple lines

Features

Low-vision-first linting for CLI tools.

What/Why/Fix

Every finding includes what happened, why it matters, and how to fix it — the same pattern it enforces.

WCAG + policy rules

Distinguishes WCAG-mapped rules (like no-color-only) from best-practice policy rules for cognitive accessibility.

CI-ready

Gate on exit codes and specific rules, not letter grades. Supports JSON output, strict mode, and baseline tracking.

Usage

CLI

# Scan a file
a11y-lint scan output.txt

# Scan from stdin
echo "ERROR: It failed" | a11y-lint scan --stdin

# Generate a report
a11y-lint report output.txt -o report.md

Python API

from a11y_lint import scan, A11yMessage

messages = scan("ERROR: It failed")

msg = A11yMessage.error(
    code="APP001",
    what="Config file missing",
    why="App cannot start without config.yaml",
    fix="Create config.yaml in project root"
)

Rules

1 WCAG rule + 7 policy rules for cognitive accessibility.

Rule
Code
Description
no-color-only
CLR001
Don't convey information only through color (WCAG 1.4.1)
line-length
FMT001
Lines should be 120 characters or fewer
no-all-caps
LNG002
Avoid all-caps text (hard to read)
plain-language
LNG001
Avoid technical jargon (EOF, STDIN, etc.)
emoji-moderation
SCR001
Limit emoji use (confuses screen readers)
punctuation
LNG003
Error messages should end with punctuation
error-structure
A11Y003
Errors should explain why and how to fix
no-ambiguous-pronouns
LNG004
Avoid starting with "it", "this", etc.

Companion Tools

Part of the a11y toolkit.

a11y-ci

CI gate for a11y-lint scorecards with baseline regression detection.

a11y-assist

Deterministic accessibility assistance for CLI failures.

a11y-evidence-engine

Evidence collection and WCAG mapping for accessibility claims.