Skip to content
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

core(a11y): upgrade axe-core to 4.1.1, update a11y audits #11661

Merged
merged 33 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
fbc3a9d
href change axe import
connorjclark Sep 17, 2020
0d602dd
fix
connorjclark Sep 17, 2020
315c290
Merge remote-tracking branch 'origin/master' into hreflang-axe
connorjclark Sep 21, 2020
9569ff4
wip
connorjclark Nov 12, 2020
d009c48
Merge branch 'hreflang-axe' into axe-4
connorjclark Nov 12, 2020
a916ba8
axe 4 working
connorjclark Nov 12, 2020
a0dca73
rm tests
connorjclark Nov 12, 2020
6274460
sample json
connorjclark Nov 12, 2020
d6c5a4b
fix hreflang
connorjclark Nov 12, 2020
f29753b
4.1
connorjclark Nov 16, 2020
bd5c03c
started on one audit
connorjclark Nov 16, 2020
8ba1f73
update
connorjclark Dec 3, 2020
93d63e8
Merge remote-tracking branch 'origin/master' into axe-4
connorjclark Dec 3, 2020
fc67764
new audits
connorjclark Dec 3, 2020
d4024d1
update
connorjclark Dec 3, 2020
dabfdb2
fix render tests
connorjclark Dec 3, 2020
db8d90c
fix smokes
connorjclark Dec 3, 2020
7d85d13
comment
connorjclark Dec 3, 2020
e1ad869
pr
connorjclark Dec 8, 2020
265783d
merge
connorjclark Dec 8, 2020
3cd2fbb
links
connorjclark Dec 8, 2020
469ae9a
4.1.1
connorjclark Dec 8, 2020
169dda1
merge remote-tracking branch 'origin/master' into axe-4
connorjclark Dec 8, 2020
bd689b7
fix
connorjclark Dec 8, 2020
ec5997f
error.message
connorjclark Dec 8, 2020
36ca169
Apply suggestions from code review
connorjclark Dec 9, 2020
9494d53
smokes
connorjclark Dec 9, 2020
4cf64ef
pr
connorjclark Dec 9, 2020
eeb8e71
Merge remote-tracking branch 'origin/master' into axe-4
connorjclark Dec 9, 2020
5d796ac
Merge remote-tracking branch 'origin/master' into axe-4
connorjclark Dec 10, 2020
1fd0db3
Merge remote-tracking branch 'origin/master' into axe-4
connorjclark Dec 14, 2020
04c21b5
revert
connorjclark Dec 15, 2020
e88f6f4
Merge remote-tracking branch 'origin/master' into axe-4
connorjclark Dec 15, 2020
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
94 changes: 46 additions & 48 deletions docs/scoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,58 +23,56 @@ All audits in the SEO category are [equally weighted](https://github.com/GoogleC

## How is the accessibility score calculated?

<!--
sum = auditRefs.reduce((sum, item) => sum += item.weight, 0);
auditRefs
.filter(a => a.weight)
.sort((a, b) => b.weight - a.weight)
.map(a => [undefined, a.id, `${(a.weight / sum * 100).toLocaleString(undefined, {maximumFractionDigits:1})}%`, undefined].join(' | '))
.join('\n')
-->
<!-- To regnerate score weights, run `node lighthouse-core/scripts/print-a11y-scoring.js`-->

The accessibility score is a weighted average. The specific weights, at the time of publishing, are [as follows](https://github.com/GoogleChrome/lighthouse/blob/080c6b4b9fec6dfcaf8e0cd8d09c3224465e4fd3/lighthouse-core/config/default-config.js#L450-L491):
The accessibility score is a weighted average. The specific weights for v7 are as follows:

(See the [v6 scoring explanation](https://github.com/GoogleChrome/lighthouse/blob/v6.5.0/docs/scoring.md#how-is-the-accessibility-score-calculated))
brendankenny marked this conversation as resolved.
Show resolved Hide resolved

| audit id | weight |
|-|-|
| aria-allowed-attr | 4.2% |
| aria-hidden-body | 4.2% |
| aria-required-attr | 4.2% |
| aria-required-children | 4.2% |
| aria-required-parent | 4.2% |
| aria-roles | 4.2% |
| aria-valid-attr-value | 4.2% |
| aria-valid-attr | 4.2% |
| button-name | 4.2% |
| duplicate-id-aria | 4.2% |
| image-alt | 4.2% |
| input-image-alt | 4.2% |
| label | 4.2% |
| meta-refresh | 4.2% |
| meta-viewport | 4.2% |
| video-caption | 4.2% |
| video-description | 4.2% |
| accesskeys | 1.3% |
| aria-hidden-focus | 1.3% |
| aria-input-field-name | 1.3% |
| aria-toggle-field-name | 1.3% |
| bypass | 1.3% |
| color-contrast | 1.3% |
| definition-list | 1.3% |
| dlitem | 1.3% |
| document-title | 1.3% |
| duplicate-id-active | 1.3% |
| frame-title | 1.3% |
| html-has-lang | 1.3% |
| html-lang-valid | 1.3% |
| layout-table | 1.3% |
| link-name | 1.3% |
| list | 1.3% |
| listitem | 1.3% |
| object-alt | 1.3% |
| tabindex | 1.3% |
| td-headers-attr | 1.3% |
| th-has-data-cells | 1.3% |
| valid-lang | 1.3% |
| aria-allowed-attr | 4.1% |
| aria-hidden-body | 4.1% |
| aria-required-attr | 4.1% |
| aria-required-children | 4.1% |
| aria-required-parent | 4.1% |
| aria-roles | 4.1% |
| aria-valid-attr-value | 4.1% |
| aria-valid-attr | 4.1% |
| button-name | 4.1% |
| duplicate-id-aria | 4.1% |
| image-alt | 4.1% |
| input-image-alt | 4.1% |
| label | 4.1% |
| meta-refresh | 4.1% |
| meta-viewport | 4.1% |
| video-caption | 4.1% |
| accesskeys | 1.2% |
| aria-command-name | 1.2% |
| aria-hidden-focus | 1.2% |
| aria-input-field-name | 1.2% |
| aria-meter-name | 1.2% |
| aria-progressbar-name | 1.2% |
| aria-toggle-field-name | 1.2% |
| aria-tooltip-name | 1.2% |
| aria-treeitem-name | 1.2% |
| bypass | 1.2% |
| color-contrast | 1.2% |
| definition-list | 1.2% |
| dlitem | 1.2% |
| document-title | 1.2% |
| duplicate-id-active | 1.2% |
| frame-title | 1.2% |
| html-has-lang | 1.2% |
| html-lang-valid | 1.2% |
| link-name | 1.2% |
| list | 1.2% |
| listitem | 1.2% |
| object-alt | 1.2% |
| tabindex | 1.2% |
| td-headers-attr | 1.2% |
| th-has-data-cells | 1.2% |
| valid-lang | 1.2% |
| form-field-multiple-labels | 0.8% |
| heading-order | 0.8% |

Expand Down
56 changes: 40 additions & 16 deletions lighthouse-cli/test/cli/__snapshots__/index-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ Object {
Object {
"path": "accessibility/aria-allowed-attr",
},
Object {
"path": "accessibility/aria-command-name",
},
Object {
"path": "accessibility/aria-hidden-body",
},
Expand All @@ -195,6 +198,12 @@ Object {
Object {
"path": "accessibility/aria-input-field-name",
},
Object {
"path": "accessibility/aria-meter-name",
},
Object {
"path": "accessibility/aria-progressbar-name",
},
Object {
"path": "accessibility/aria-required-attr",
},
Expand All @@ -210,6 +219,12 @@ Object {
Object {
"path": "accessibility/aria-toggle-field-name",
},
Object {
"path": "accessibility/aria-tooltip-name",
},
Object {
"path": "accessibility/aria-treeitem-name",
},
Object {
"path": "accessibility/aria-valid-attr-value",
},
Expand Down Expand Up @@ -264,9 +279,6 @@ Object {
Object {
"path": "accessibility/label",
},
Object {
"path": "accessibility/layout-table",
},
Object {
"path": "accessibility/link-name",
},
Expand Down Expand Up @@ -300,9 +312,6 @@ Object {
Object {
"path": "accessibility/video-caption",
},
Object {
"path": "accessibility/video-description",
},
Object {
"path": "accessibility/manual/custom-controls-labels",
},
Expand Down Expand Up @@ -470,6 +479,11 @@ Object {
"id": "aria-allowed-attr",
"weight": 10,
},
Object {
"group": "a11y-aria",
"id": "aria-command-name",
"weight": 3,
},
Object {
"group": "a11y-aria",
"id": "aria-hidden-body",
Expand All @@ -485,6 +499,16 @@ Object {
"id": "aria-input-field-name",
"weight": 3,
},
Object {
"group": "a11y-aria",
"id": "aria-meter-name",
"weight": 3,
},
Object {
"group": "a11y-aria",
"id": "aria-progressbar-name",
"weight": 3,
},
Object {
"group": "a11y-aria",
"id": "aria-required-attr",
Expand All @@ -510,6 +534,16 @@ Object {
"id": "aria-toggle-field-name",
"weight": 3,
},
Object {
"group": "a11y-aria",
"id": "aria-tooltip-name",
"weight": 3,
},
Object {
"group": "a11y-aria",
"id": "aria-treeitem-name",
"weight": 3,
},
Object {
"group": "a11y-aria",
"id": "aria-valid-attr-value",
Expand Down Expand Up @@ -600,11 +634,6 @@ Object {
"id": "label",
"weight": 10,
},
Object {
"group": "a11y-tables-lists",
"id": "layout-table",
"weight": 3,
},
Object {
"group": "a11y-names-labels",
"id": "link-name",
Expand Down Expand Up @@ -660,11 +689,6 @@ Object {
"id": "video-caption",
"weight": 10,
},
Object {
"group": "a11y-audio-video",
"id": "video-description",
"weight": 10,
},
Object {
"id": "logical-tab-order",
"weight": 0,
Expand Down
22 changes: 22 additions & 0 deletions lighthouse-cli/test/fixtures/a11y/a11y_tester.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@
<section>
<div id="aria-input-field-name" role="textbox">text-in-a-box</div>
</section>
<p>aria-meter-name</p>
connorjclark marked this conversation as resolved.
Show resolved Hide resolved
<section>
<div id="aria-meter-name" role="meter">text-in-a-box</div>
</section>
<p>aria-treeitem-name</p>
<section>
<div role="tree">
<div id="aria-treeitem-name" role="treeitem"></div>
</div>
</section>
<p>aria-command-name</p>
<section>
<div id="aria-command-name" role="button"></div>
</section>
<p>aria-tooltip-name</p>
<section>
<div id="aria-tooltip-name" role="tooltip"></div>
</section>
<p>aria-progressbar-name</p>
<section>
<div id="aria-progressbar-name" role="progressbar">text-in-a-box</div>
</section>
<p>aria-required-attr</p>
<section>
<div
Expand Down
Loading