Skip to content

Commit 6d479e9

Browse files
crisbetotjshiu
andcommitted
fix: update a11y violation scores
Co-authored-by: Tiffany Shiu <[email protected]>
1 parent a68b896 commit 6d479e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

runner/ratings/built-in-ratings/axe-rating.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import {
88

99
// Define the scoring weights for each violation impact level as a coefficient penalty.
1010
const IMPACT_COEFFICIENTS = {
11-
critical: 0.3,
12-
serious: 0.15,
13-
moderate: 0.1,
14-
minor: 0.05,
11+
critical: 0.5,
12+
serious: 0.3,
13+
moderate: 0.15,
14+
minor: 0.1,
1515
};
1616

1717
/**
@@ -23,13 +23,13 @@ export const axeRating: PerBuildRating = {
2323
description: 'Checks for accessibility violations using the Axe-core engine.',
2424
category: RatingCategory.MEDIUM_IMPACT,
2525
id: 'axe-a11y',
26-
scoreReduction: '10%',
26+
scoreReduction: '50%',
2727
rate: ({ buildResult, axeRepairAttempts }) => {
2828
const violations = buildResult.axeViolations as Result[] | undefined;
2929
// Subtract from a starting coefficient of 1 based on the impact of each violation.
3030
let coefficient = 1.0;
3131
// Apply a penalty for each repair attempt.
32-
coefficient -= (axeRepairAttempts ?? 0) * 0.1;
32+
coefficient -= (axeRepairAttempts ?? 0) * 0.2;
3333
let message: string = '';
3434

3535
if (violations === undefined) {

0 commit comments

Comments
 (0)