Add to text summary
mgifford opened this issue · 0 comments
Right now when running the cli.js file I get output like:
Purple A11y version: 0.9.41
Starting scan...
Fetching URLs. This might take some time...
Fetch URLs completed. Beginning scan
┌─────────────────────────────────────────┐
│ Scan Summary │
│ │
│ Must Fix: 0 issues / 0 occurrences │
│ Good to Fix: 1 issues / 353 occurrences │
│ Passed: 135610 occurrences │
└─────────────────────────────────────────┘
┌────────────────────────────────────────────────────────┐
│ Report of this run is at a11y-scan-results.zip │
│ Results directory is at results/20240105_181127_custom │
└────────────────────────────────────────────────────────┘
Which kinda works when you're running 1 domain.
However, you could add:
- Domain Name
- Number of URLs Crawled
- axeImpact scores
- WCAGissue numbers
## Add a score for better comparison.
I also like developing a score so that scans can be more easily compared. This is one approach.
Use the axe criteria to addresses severity - Score = (critical*3 + serious*2 + moderate*1.5 minor) / urls*5 - which allows you to easily compare a 1000 page site to a 10000 page site with a numeric value which lets you determine if the site is getting better or worse for users. https://github.com/CivicActions/purple-hats/blob/master/mergeAxeResults.js#L383
Grade that score to a letter grade that is easier for folks to understand:
- // A+ = 0 ; A <= 0.1 ; A- <= 0.3 ;
- // B+ <= 0.5 ; B <= 0.7 ; B- <= 0.9 ;
- // C+ <= 2 ; C <= 4 C- <= 6 ;
- // D+ <= 8 ; D <= 10 ; D- <= 13 ;
- // F+ <= 15 ; F <= 20 ; F- >= 20 ;