Skip to content

Commit c307412

Browse files
committed
Docs: Fix configuration.md to match actual YAML structure
- Use correct check name: heading_hierarchy (not heading) - Include scan_strategy configuration - Match exact structure from generator template - Fix order: summary, scan_strategy, static_scanner, checks
1 parent 76429ff commit c307412

1 file changed

Lines changed: 50 additions & 29 deletions

File tree

docs_site/configuration.md

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,62 +11,82 @@ You can customize how the gem works by creating a `config/accessibility.yml` fil
1111

1212
## Quick Start Configuration
1313

14-
Here is a recommended configuration file that works for most Rails apps:
14+
Here is the configuration file structure that gets generated when you run the installer:
1515

1616
```yaml
1717
# config/accessibility.yml
1818

19-
# Compliance Goal (A, AA, or AAA)
19+
# WCAG compliance level (A, AA, AAA)
2020
wcag_level: AA
2121

22-
# Enable/Disable specific checks
22+
# Summary configuration
23+
# Control how accessibility test summaries are displayed
24+
summary:
25+
# Show summary at end of test suite (true/false)
26+
show_summary: true
27+
28+
# Show only errors in summary, hide warnings (true/false)
29+
errors_only: false
30+
31+
# Show fix suggestions in error messages (true/false)
32+
show_fixes: true
33+
34+
# Ignore warnings completely - only show errors (true/false)
35+
ignore_warnings: false
36+
37+
# Scanning strategy
38+
# 'paths' - Scan by visiting routes/paths (default)
39+
# 'view_files' - Scan by finding view files and visiting their routes
40+
scan_strategy: 'view_files'
41+
42+
# Static scanner configuration
43+
# Controls behavior of the static file scanner (a11y_static_scanner)
44+
static_scanner:
45+
# Only scan files that have changed since last scan (true/false)
46+
scan_changed_only: true
47+
48+
# Check interval in seconds when running continuously
49+
check_interval: 3
50+
51+
# Force full scan on startup (true/false)
52+
full_scan_on_startup: true
53+
54+
# Global check configuration
55+
# Set to false to disable a check globally
2356
checks:
2457
form_labels: true
2558
image_alt_text: true
2659
interactive_elements: true
27-
heading: true
60+
heading_hierarchy: true
2861
keyboard_accessibility: true
2962
aria_landmarks: true
3063
form_errors: true
3164
table_structure: true
3265
duplicate_ids: true
3366
skip_links: true
34-
color_contrast: false # Disabled by default (slow)
35-
36-
# Static Scanner (for bin/dev)
37-
static_scanner:
38-
scan_changed_only: true
39-
check_interval: 3
40-
full_scan_on_startup: true
41-
42-
# Reporting
43-
summary:
44-
show_summary: true
45-
show_fixes: true
46-
ignore_warnings: false
67+
color_contrast: false # Disabled by default (requires JS evaluation)
4768
```
4869
4970
---
5071
5172
## Profiles (Environments)
5273
53-
You often want different rules for Development vs. CI. You can define profiles in the same file:
74+
You can define different configurations for different environments:
5475
5576
```yaml
5677
# ... base config above ...
5778

5879
development:
5980
checks:
60-
color_contrast: false # Fast scans in dev
61-
static_scanner:
62-
scan_changed_only: true
81+
color_contrast: false # Skip in dev for speed
82+
83+
test:
84+
checks:
85+
# Test environment uses global settings by default
6386

6487
ci:
6588
checks:
66-
color_contrast: true # Full check in CI
67-
skip_links: true # Strict requirements
68-
summary:
69-
ignore_warnings: true # Only fail on errors
89+
color_contrast: true # Full checks in CI
7090
```
7191
7292
To run a specific profile:
@@ -78,16 +98,17 @@ RAILS_A11Y_PROFILE=ci bundle exec rspec
7898

7999
## Ignoring Specific Rules
80100

81-
Sometimes you have legacy code that you can't fix right away. You can ignore specific rules with a reason:
101+
Temporarily ignore specific rules while fixing issues:
82102

83103
```yaml
84104
ignored_rules:
85105
- rule: form_labels
86-
reason: "Legacy login form, scheduled for redesign"
87-
- rule: contrast
88-
reason: "Brand colors need update from design team"
106+
reason: "Legacy form, scheduled for refactor in Q2"
107+
comment: "Will be fixed in PR #123"
89108
```
90109
110+
**Important:** Always include a reason and plan to fix. This is for temporary exceptions, not permanent workarounds.
111+
91112
---
92113
93114
## Ruby Configuration

0 commit comments

Comments
 (0)