-
Notifications
You must be signed in to change notification settings - Fork 9.6k
core(a11y): upgrade axe-core to 4.1.1, update a11y audits #11661
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
Conversation
docs/scoring.md
Outdated
| <!-- node lighthouse-core/scripts/print-a11y-scoring.js --> | ||
|
|
||
| <!-- TODO: need a commit first to update url ... --> | ||
| 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): |
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.
Can we just link to master?
| // Ensure errors can be serialized over the protocol | ||
| // @ts-expect-error | ||
| const augmentAxeNodes = result => { | ||
| if (result.error instanceof Error) { |
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.
I added types here. I suppose .error is not part of the handwritten, public api.
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.
Should verify, I don't think there are any tests for this.
|
It looks like 4.1 (scheduled for next Monday) is where all their big size improvements are going to be landing:
|
|
4.1 landed just now. new rules to consider https://github.com/dequelabs/axe-core/releases/tag/v4.1.0 |
|
All these new rules deal with accessible names, just like With 1 and (maybe 2) we could reuse the same i18n strings and web.dev docs. To do 1 we'd need to determine if all of these are of similar weight. |
The rules have tags for the WCAG level they fail (wcag2a for level A, wcag2aa for level AA etc.) or just "best-practice". So you could weigh them by their WCAG level or whether they're "just" best-practice. |
|
Thanks for the note @eps1lon We decided:
|
brendankenny
left a comment
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.
nice!
| const Gatherer = require('./gatherer.js'); | ||
| const fs = require('fs'); | ||
| const axeLibSource = fs.readFileSync(require.resolve('axe-core/axe.min.js'), 'utf8'); | ||
| const axeLibSource = require('../../lib/axe.js').source; |
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.
I was scared of the changes in this file until I did "Hide whitespace changes". Nice cleanup! Much more readable.
| @@ -0,0 +1,29 @@ | |||
| /** | |||
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.
There is a comment. L26
ha, I guess I missed it, sorry :)
Co-authored-by: Brendan Kenny <[email protected]>
|
@connorjclark is the status of this PR correct that you're awaiting another review? |
|
yes. @Beytoven do you have time to review this? |
brendankenny
left a comment
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.
LGTM! (needs a rebase/merge)
https://github.com/dequelabs/axe-core/releases
layout-tablefeat(layout-table): deprecate layout-table rule and checks dequelabs/axe-core#1885video-descriptionfeat(video-description): deprecate video-description rule dequelabs/axe-core#1737aria-treeitem-namefeat(new-rule): check that treeitem role has an accessible name dequelabs/axe-core#2615aria-command-namefeat(new-rule): ARIA links, buttons, menuitems have an accessible name dequelabs/axe-core#2571aria-tooltip-namefeat(new-rule): aria-tooltip-name, check that tooltips have an accessible name dequelabs/axe-core#2548aria-meter-namefeat(new-rule): check that meter role has an accessible name dequelabs/axe-core#2607aria-progressbar-namefeat(new-rule): check that progressbars have an accessible name dequelabs/axe-core#2555(merged #11442 to this branch, as it was simpler than making things async, and I want to avoid churn).