Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/audits/accessibility/aria-allowed-role.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ARIAAllowedRole extends AxeAudit {
title: str_(UIStrings.title),
failureTitle: str_(UIStrings.failureTitle),
description: str_(UIStrings.description),
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
requiredArtifacts: ['Accessibility'],
};
}
Expand Down
1 change: 1 addition & 0 deletions core/audits/accessibility/image-redundant-alt.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class ImageRedundantAlt extends AxeAudit {
title: str_(UIStrings.title),
failureTitle: str_(UIStrings.failureTitle),
description: str_(UIStrings.description),
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
requiredArtifacts: ['Accessibility'],
};
}
Expand Down
1 change: 0 additions & 1 deletion core/audits/accessibility/landmark-one-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class LandmarkOneMain extends AxeAudit {
title: str_(UIStrings.title),
failureTitle: str_(UIStrings.failureTitle),
description: str_(UIStrings.description),
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
requiredArtifacts: ['Accessibility'],
};
}
Expand Down
1 change: 1 addition & 0 deletions core/audits/accessibility/table-duplicate-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class TableDuplicateName extends AxeAudit {
title: str_(UIStrings.title),
failureTitle: str_(UIStrings.failureTitle),
description: str_(UIStrings.description),
scoreDisplayMode: AxeAudit.SCORING_MODES.INFORMATIVE,
requiredArtifacts: ['Accessibility'],
};
}
Expand Down
53 changes: 36 additions & 17 deletions core/config/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,14 +496,34 @@ const defaultConfig = {
description: str_(UIStrings.a11yCategoryDescription),
manualDescription: str_(UIStrings.a11yCategoryManualDescription),
supportedModes: ['navigation', 'snapshot'],
// Audit weights are meant to match the aXe scoring system of
// minor, moderate, serious, and critical.
// See the audits listed at dequeuniversity.com/rules/axe/4.7.
// Click on an audit and check the right hand column to see its severity.
// Audit weights weights are derived from the axe-core "Impact",
// with adjustments based on axe-core "Tags":
//
// ┌────────────┬───────────────────────────────────────────────┐
// │ Impact │ Weight Based on Tags │
// │ ├──────────────┬─────────────────┬──────────────┤
// │ │ wcag A+AA │ best-practice │ experimental │
// │ │ (ex: wcag2aa)│ (w/o wcag tag) │ │
// ├────────────┼──────────────┼─────────────────┼──────────────┤
// │ Minor │ 1 │ 0 │ 0 │
// │ Moderate │ 3 │ 3 │ 0 │
// │ Serious │ 7 │ 7 │ 0 │
// │ Critical │ 10 │ 10 │ 0 │
// └────────────┴──────────────┴─────────────────┴──────────────┘
//
// Notes:
// • Experimental rules always have weight 0
// • Best practice rules only affect scores when tagged with wcagA+AA
// and are moderate, serious, or critical.
//
// To find the latest axe-core Impact and Tag values:
// 1. Browse to https://dequeuniversity.com/rules/axe/html.
// 2. Click on the latest rule set (ex: https://dequeuniversity.com/rules/axe/html/4.10)
// 3. Review the tables
auditRefs: [
{id: 'accesskeys', weight: 7, group: 'a11y-navigation'},
{id: 'aria-allowed-attr', weight: 10, group: 'a11y-aria'},
{id: 'aria-allowed-role', weight: 1, group: 'a11y-aria'},
{id: 'aria-allowed-role', weight: 0, group: 'a11y-best-practices'}, // Minor, best-practice
{id: 'aria-command-name', weight: 7, group: 'a11y-aria'},
{id: 'aria-conditional-attr', weight: 7, group: 'a11y-aria'},
{id: 'aria-deprecated-role', weight: 1, group: 'a11y-aria'},
Expand All @@ -517,7 +537,7 @@ const defaultConfig = {
{id: 'aria-required-attr', weight: 10, group: 'a11y-aria'},
{id: 'aria-required-children', weight: 10, group: 'a11y-aria'},
{id: 'aria-required-parent', weight: 10, group: 'a11y-aria'},
{id: 'aria-roles', weight: 7, group: 'a11y-aria'},
{id: 'aria-roles', weight: 10, group: 'a11y-aria'}, // Critical, wcag2a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also went to critical in 4.8 dequeuniversity.com/rules/axe/4.8/label

{id: 'aria-text', weight: 7, group: 'a11y-aria'},
{id: 'aria-toggle-field-name', weight: 7, group: 'a11y-aria'},
{id: 'aria-tooltip-name', weight: 7, group: 'a11y-aria'},
Expand All @@ -538,21 +558,21 @@ const defaultConfig = {
{id: 'html-lang-valid', weight: 7, group: 'a11y-language'},
{id: 'html-xml-lang-mismatch', weight: 3, group: 'a11y-language'},
{id: 'image-alt', weight: 10, group: 'a11y-names-labels'},
{id: 'image-redundant-alt', weight: 1, group: 'a11y-names-labels'},
{id: 'image-redundant-alt', weight: 0, group: 'a11y-names-labels'}, // Minor, best-practice
{id: 'input-button-name', weight: 10, group: 'a11y-names-labels'},
{id: 'input-image-alt', weight: 10, group: 'a11y-names-labels'},
{id: 'label', weight: 7, group: 'a11y-names-labels'},
{id: 'label', weight: 10, group: 'a11y-names-labels'}, // Critical, wcag2a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{id: 'link-in-text-block', weight: 7, group: 'a11y-color-contrast'},
{id: 'link-name', weight: 7, group: 'a11y-names-labels'},
{id: 'list', weight: 7, group: 'a11y-tables-lists'},
{id: 'listitem', weight: 7, group: 'a11y-tables-lists'},
{id: 'meta-refresh', weight: 10, group: 'a11y-best-practices'},
{id: 'meta-viewport', weight: 10, group: 'a11y-best-practices'},
{id: 'object-alt', weight: 7, group: 'a11y-names-labels'},
{id: 'select-name', weight: 7, group: 'a11y-names-labels'},
{id: 'select-name', weight: 10, group: 'a11y-names-labels'}, // Critical, wcag2a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{id: 'skip-link', weight: 3, group: 'a11y-names-labels'},
{id: 'tabindex', weight: 7, group: 'a11y-navigation'},
{id: 'table-duplicate-name', weight: 1, group: 'a11y-tables-lists'},
{id: 'table-duplicate-name', weight: 0, group: 'a11y-best-practices'}, // Minor, best-practice
{id: 'target-size', weight: 7, group: 'a11y-best-practices'},
{id: 'td-headers-attr', weight: 7, group: 'a11y-tables-lists'},
{id: 'th-has-data-cells', weight: 7, group: 'a11y-tables-lists'},
Expand All @@ -569,13 +589,12 @@ const defaultConfig = {
{id: 'offscreen-content-hidden', weight: 0},
{id: 'custom-controls-labels', weight: 0},
{id: 'custom-controls-roles', weight: 0},
// Hidden audits
{id: 'empty-heading', weight: 0, group: 'hidden'},
{id: 'identical-links-same-purpose', weight: 0, group: 'hidden'},
{id: 'landmark-one-main', weight: 0, group: 'hidden'},
{id: 'label-content-name-mismatch', weight: 0, group: 'hidden'},
{id: 'table-fake-caption', weight: 0, group: 'hidden'},
{id: 'td-has-header', weight: 0, group: 'hidden'},
{id: 'empty-heading', weight: 0, group: 'a11y-best-practices'},
{id: 'identical-links-same-purpose', weight: 0, group: 'a11y-best-practices'},
{id: 'landmark-one-main', weight: 3, group: 'a11y-best-practices'},
{id: 'label-content-name-mismatch', weight: 0, group: 'hidden'}, // Serious, experimental
{id: 'table-fake-caption', weight: 0, group: 'hidden'}, // Serious, experimental
{id: 'td-has-header', weight: 0, group: 'hidden'}, // Critical, experimental
],
},
'best-practices': {
Expand Down
2 changes: 1 addition & 1 deletion core/scoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ReportScoring {
const member = {...configMember};

// If a result was not applicable, meaning its checks did not run against anything on
// the page, force it's weight to 0. It will not count during the arithmeticMean() but
// the page, force its weight to 0. It will not count during the arithmeticMean() but
// will still be included in the final report json and displayed in the report as
// "Not Applicable".
const result = resultsByAuditId[member.id];
Expand Down
Loading