-
Notifications
You must be signed in to change notification settings - Fork 9.6k
DO NOT MERGE: A11y adjust weights simplified diff #16667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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'}, | ||
|
|
@@ -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 | ||
| {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'}, | ||
|
|
@@ -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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also went to critical in 4.8 https://dequeuniversity.com/rules/axe/4.8/label |
||
| {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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bingo! this one went from critical, to serious
|
||
| {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'}, | ||
|
|
@@ -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': { | ||
|
|
||
There was a problem hiding this comment.
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