tpt-accessfix
TypeScriptWCAG accessibility audit + automated remediation for React, Vue, Angular, Svelte & vanilla HTML — CLI, VS Code, browser extension, Figma & IntelliJ plugins, with confidence-tiered codemods, trend tracking, and compliance reports.
0 stars0 forks0 watchers
Languages
TypeScript78.2%Python7.0%Rust6.9%JavaScript4.3%HTML2.7%CSS0.9%
README
TPT AccessFix
Open-source accessibility automation platform that goes beyond traditional a11y auditing by providing automated remediation suggestions and one-click fixes for common WCAG violations.
Architecture
tpt-accessfix/
├── packages/
│ ├── shared/ # Shared types, enums, utilities
│ ├── core/ # Audit engine, rules engine, codemods
│ ├── cli/ # CLI tool (tpt-accessfix)
│ ├── vscode-extension/ # VS Code extension
│ ├── browser-extension/ # Chrome & Firefox extension
│ ├── component-library/ # Accessible React components
│ ├── storybook-addon/ # Storybook a11y addon
│ ├── figma-plugin/ # Figma design plugin
│ ├── sketch-plugin/ # Sketch design plugin
│ ├── intellij-plugin/ # IntelliJ IDEA plugin
│ └── vim-plugin/ # Vim/Neovim plugin
├── engines/
│ ├── ml-engine/ # Python ML component (Python)
│ └── rust-engine/ # Performance engine (Rust)
├── examples/ # Usage examples
└── docs/ # Documentation
Quick Start
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run an accessibility audit
pnpm --filter tpt-accessfix build
./packages/cli/dist/index.js audit . --output html
# Or use the CLI directly
tpt-accessfix init
tpt-accessfix audit . --output html
tpt-accessfix fix . --dry-run
CLI Commands
| Command | Description |
|---|---|
tpt-accessfix init [dir] | Generate .tpt-accessfix.json config |
tpt-accessfix audit [dir] | Run accessibility audit |
tpt-accessfix fix [dir] | Apply high-confidence auto-fixes |
tpt-accessfix watch [dir] | Real-time re-audit on file save |
tpt-accessfix report [dir] | Generate formatted report (html/markdown/sarif) |
tpt-accessfix compliance [dir] | Full WCAG compliance report for legal documentation |
tpt-accessfix trend [dir] | Analyse accessibility score over time |
tpt-accessfix benchmark [dir] | Compare score against industry averages |
Key flags
tpt-accessfix audit .
--output <format> # json, html, junit, sarif, markdown
--framework <fw> # react, vue, angular, svelte, vanilla, auto
--level <level> # A, AA, AAA
--interactive # Interactive mode with auto-fix prompts
--save-snapshot # Append score to .tpt-accessfix-snapshots.json
tpt-accessfix fix .
--dry-run # Preview without making changes
tpt-accessfix compliance .
--project <name> # Project name on the report
--auditor <name> # Auditor name
--level AA # WCAG level
tpt-accessfix benchmark .
--industry <category> # technology, healthcare, education, finance, ecommerce, government…
--list-industries # Print all available categories
WCAG Rules Implemented (16 rules)
| Rule ID | WCAG | Description | Confidence |
|---|---|---|---|
alt-text | 1.1.1 | Images must have alt text | High |
form-labels | 1.3.1, 3.3.2 | Form inputs need labels | High |
semantic-html | 1.3.1 | Use semantic HTML5 elements | High |
heading-hierarchy | 1.3.1 | Headings must form proper hierarchy | High |
language-attribute | 3.1.1 | HTML needs lang attribute | High |
skip-navigation | 2.4.1 | Pages need skip navigation link | High |
focus-indicator | 2.4.7 | Interactive elements need visible focus | High |
focus-appearance | 2.4.13 | Focus indicators must be visible (AAA) | High |
aria-roles | 4.1.2 | Interactive elements need ARIA roles | Medium |
keyboard-support | 2.1.1 | Click handlers need keyboard support | Medium |
color-contrast | 1.4.3 | Text needs sufficient contrast (4.5:1) | Medium |
target-size | 2.5.8 | Interactive targets ≥ 24×24 CSS px | Medium |
dragging-movements | 2.5.7 | Dragging operations need alternatives | Medium |
non-text-contrast | 1.4.11 | UI component contrast ≥ 3:1 | Medium |
contrast-enhanced | 1.4.6 | Enhanced contrast 7:1 (AAA) | Low |
text-spacing | 1.4.12 | Text spacing adjustments (AAA) | Low |
Confidence System
- High: Auto-applied (e.g., missing alt text, form labels)
- Medium: Requires review (e.g., ARIA role suggestions)
- Low: Educational guidance (e.g., keyboard patterns)
Technology Stack
- TypeScript - Core engine, CLI, all plugins
- Python - ML-based remediation suggestions
- Rust - High-performance parallel rule execution
- Playwright - Runtime accessibility tree capture
- Babel/SWC - AST manipulation for codemods
License
Apache License 2.0