wcag-a11y 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -15
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,13 +78,8 @@ npm install -g wcag-a11y
|
|
|
78
78
|
## Quick start
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
|
-
# 1. Configure your AI provider
|
|
82
|
-
wcag-a11y init
|
|
83
|
-
wcag-a11y init --framework react # React / Vite
|
|
84
|
-
wcag-a11y init --framework vue # Vue / Nuxt
|
|
85
|
-
wcag-a11y init --framework angular # Angular
|
|
86
|
-
wcag-a11y init --framework svelte # Svelte / SvelteKit
|
|
87
|
-
wcag-a11y init # plain HTML or auto-detect
|
|
81
|
+
# 1. Configure your AI provider (Gemini is free, no credit card)
|
|
82
|
+
wcag-a11y init
|
|
88
83
|
|
|
89
84
|
# 2. Start your dev server, then scan
|
|
90
85
|
wcag-a11y scan -u http://localhost:3000
|
|
@@ -92,6 +87,12 @@ wcag-a11y scan -u http://localhost:3000
|
|
|
92
87
|
|
|
93
88
|
Add `--pages / /about /contact` to scan specific routes, or `--crawl` to follow links automatically.
|
|
94
89
|
|
|
90
|
+
**Optional — set your framework once:** The tool auto-detects common frameworks at runtime. If detection fails (e.g. scanning a staging URL, or using Astro/SvelteKit), set it in your config so every run uses the right syntax:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
wcag-a11y init --framework next # or react, vue, angular, svelte, astro, …
|
|
94
|
+
```
|
|
95
|
+
|
|
95
96
|
---
|
|
96
97
|
|
|
97
98
|
## Commands
|
|
@@ -121,7 +122,7 @@ wcag-a11y scan -u http://localhost:3000 --terminal --fast-mode
|
|
|
121
122
|
| `--group <strategy>` | `rule` | `rule`: one prompt per rule type. `none`: one prompt per element |
|
|
122
123
|
| `--ci` | off | Exit with code `1` if any violations are found |
|
|
123
124
|
| `--provider <name>` | from config | Override AI provider for this run |
|
|
124
|
-
| `--framework <name>` | from config | Override framework for this run
|
|
125
|
+
| `--framework <name>` | from config | *(optional)* Override framework for this run. Auto-detected by default; use this when scanning staging URLs or for frameworks outside the detection list |
|
|
125
126
|
|
|
126
127
|
---
|
|
127
128
|
|
|
@@ -165,27 +166,27 @@ wcag-a11y fix --from-report --apply # patches files from that report, no s
|
|
|
165
166
|
| `--from-report [path]` | `a11y-report.md` | Load violations from an existing report instead of rescanning |
|
|
166
167
|
| `--apply` | off | Write fixes to disk (dry-run without this flag) |
|
|
167
168
|
| `--provider <name>` | from config | Override AI provider for this run |
|
|
168
|
-
| `--framework <name>` | from config | Override framework for this run
|
|
169
|
+
| `--framework <name>` | from config | *(optional)* Override framework for this run. Auto-detected by default; use this when scanning staging URLs or for frameworks outside the detection list |
|
|
169
170
|
|
|
170
171
|
---
|
|
171
172
|
|
|
172
173
|
### `wcag-a11y init`
|
|
173
174
|
|
|
174
|
-
Create `a11y.config.json` pre-configured for your chosen provider
|
|
175
|
+
Create `a11y.config.json` pre-configured for your chosen provider.
|
|
175
176
|
|
|
176
177
|
```bash
|
|
177
178
|
wcag-a11y init # Gemini (free, default)
|
|
178
|
-
wcag-a11y init --provider openai
|
|
179
|
-
wcag-a11y init --provider ollama
|
|
180
|
-
|
|
179
|
+
wcag-a11y init --provider openai
|
|
180
|
+
wcag-a11y init --provider ollama # local — no API key needed
|
|
181
|
+
wcag-a11y init --provider openai --framework next # optional: save framework too
|
|
181
182
|
```
|
|
182
183
|
|
|
183
184
|
| Flag | Description |
|
|
184
185
|
|---|---|
|
|
185
186
|
| `--provider <name>` | AI provider. Default: `gemini`. See [AI Providers](#ai-providers) for all options |
|
|
186
|
-
| `--framework <name>` | Your project framework — saved to config so every scan uses it automatically |
|
|
187
|
+
| `--framework <name>` | *(optional)* Your project framework — saved to config so every scan uses it automatically. The tool auto-detects common frameworks; use this flag when scanning staging URLs or using a framework not in the detection list |
|
|
187
188
|
|
|
188
|
-
|
|
189
|
+
Accepted framework values: `next`, `react`, `vue`, `nuxt`, `angular`, `svelte`, `gatsby`, `remix`, `astro` — or any free-form string. You can also add `"framework": "next"` directly to `a11y.config.json` at any time.
|
|
189
190
|
|
|
190
191
|
---
|
|
191
192
|
|
|
@@ -227,6 +228,15 @@ All models are configurable. If the AI response is unparseable, the tool generat
|
|
|
227
228
|
|
|
228
229
|
Run `wcag-a11y init` to generate `a11y.config.json`. Only fill in the fields for your chosen provider. This file is gitignored by default.
|
|
229
230
|
|
|
231
|
+
```json
|
|
232
|
+
{
|
|
233
|
+
"provider": "gemini",
|
|
234
|
+
"apiKey": "YOUR_GEMINI_API_KEY"
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
`"framework"` is optional — add it if auto-detection fails for your setup:
|
|
239
|
+
|
|
230
240
|
```json
|
|
231
241
|
{
|
|
232
242
|
"provider": "gemini",
|
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ const program = new Command();
|
|
|
13
13
|
program
|
|
14
14
|
.name('wcag-a11y')
|
|
15
15
|
.description('WCAG 2.1/2.2 accessibility auditor with AI-powered fixes')
|
|
16
|
-
.version('0.4.
|
|
16
|
+
.version('0.4.3');
|
|
17
17
|
program
|
|
18
18
|
.command('init')
|
|
19
19
|
.description('Create a11y.config.json in the current directory')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wcag-a11y",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "WCAG 2.1/2.2 accessibility auditor with AI-powered fixes. Crawls your dev server with Playwright, runs 40+ checks, and uses AI (12 providers) to generate fix prompts or patch source files directly.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wcag",
|