baseline
Create and manage UX audit baseline snapshots to track accessibility improvements and score changes over time
Create baseline snapshots of audit results for tracking UX improvements over time.
Synopsis
vertaa baseline [options]Description
The baseline command creates a snapshot of your current audit results. Use this baseline with subsequent audits to track new issues, resolved issues, and overall score trends. Baselines are essential for CI/CD quality gates that prevent regressions.
Why Use Baselines?
Baselines solve a common problem: you inherit a codebase with existing UX issues that can't all be fixed immediately. Instead of:
- Failing every audit (impractical)
- Ignoring all issues (defeats the purpose)
You can:
- Create a baseline of known issues
- Only fail on new issues introduced after the baseline
- Gradually improve while preventing regressions
Quick Examples
Options
| Parameter | Type | Required | Description |
|---|---|---|---|
| -u, --url | string | required | URL to audit for baseline creation |
| -o, --output | string | optional | Output file path for the baselineDefault: .vertaaux/baseline.json |
| --update | string | optional | Update an existing baseline file instead of creating new |
| --mode | string | optional | Audit mode: basic, standard, deepDefault: basic |
| --routes | string | optional | Comma-separated routes to include in baseline |
| --merge | boolean | optional | Merge with existing baseline instead of replacingDefault: false |
Baseline File Format
The baseline file is a JSON document containing:
{
"version": "1.0",
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z",
"url": "https://example.com",
"mode": "standard",
"scores": {
"overall": 78,
"ux": 82,
"accessibility": 71,
"information_architecture": 80,
"performance": 79
},
"issues": [
{
"fingerprint": "a1b2c3d4e5f6",
"rule": "color-contrast",
"severity": "error",
"category": "accessibility",
"selector": ".button-secondary",
"message": "Color contrast ratio 3.2:1 below 4.5:1 minimum",
"acknowledged": false,
"acknowledged_by": null,
"acknowledged_at": null,
"reason": null
}
],
"summary": {
"total_issues": 15,
"errors": 3,
"warnings": 8,
"info": 4
}
}Issue Fingerprints
Each issue has a stable fingerprint hash based on:
- Rule ID
- Element selector
- Issue message
This allows matching issues across audits even when line numbers or positions change.
Workflow
Initial Setup
- Run an audit to see current state:
- Create a baseline capturing current issues:
- Commit the baseline to version control:
git add baseline.json
git commit -m "Add UX audit baseline"CI/CD Usage
Use the baseline in your CI pipeline to catch regressions:
Updating the Baseline
After fixing issues, update the baseline:
Baseline Hygiene
Update your baseline periodically (e.g., after each release) to capture improvements. A stale baseline means new issues might be hidden among the "known" ones.
Acknowledging Issues
Mark issues as intentionally accepted:
{
"fingerprint": "a1b2c3d4e5f6",
"rule": "color-contrast",
"acknowledged": true,
"acknowledged_by": "designer@example.com",
"acknowledged_at": "2026-01-15T10:30:00Z",
"reason": "Brand colors approved by accessibility team"
}Acknowledged issues are excluded from regression checks.
Exit Codes
| Code | Meaning |
|---|---|
0 | Baseline created/updated successfully |
1 | Failed to create baseline (audit failed) |
2 | Error writing baseline file |
Examples
Create Baseline for Multiple Routes
Deep Analysis Baseline
Merge with Existing Baseline
Best Practices
Baseline Best Practices
- Commit baselines to version control - Track changes over time
- Use consistent audit modes - Don't create baseline with
basicand audit withdeep - Review baseline updates - Don't blindly accept new issues
- Set up automated baseline updates - After releases or on schedule
- Document acknowledged issues - Future maintainers need context
Related
diff
Compare two audit results directly
audit
Run audits with baseline comparison
policy
Configure quality gates with policies
CI/CD Integration
Automate baseline comparisons
Was this page helpful?