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

deps(axe-core): upgrade to 4.2.1 #12575

Merged
merged 3 commits into from
May 27, 2021
Merged
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
2 changes: 1 addition & 1 deletion lighthouse-cli/test/fixtures/a11y/a11y_tester.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<section>
<div id="duplicate-id-aria" class="duplicate-id-aria"></span>
<div id="duplicate-id-aria"></div>
<div aria-labelledby="duplicate-id-aria"></div>
<input type="text" aria-labelledby="duplicate-id-aria"/>
</section>
<p>form-field-multiple-labels</p>
<section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const expectations = [
},
'selector': 'body > section > div > div#aria-treeitem-name',
'snippet': '<div id="aria-treeitem-name" role="treeitem">',
'explanation': 'Fix any of the following:\n Element does not have text that is visible to screen readers\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n aria-label attribute does not exist or is empty\n Element has no title attribute',
'explanation': 'Fix any of the following:\n Element does not have text that is visible to screen readers\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute',
'nodeLabel': 'div',
},
},
Expand All @@ -154,7 +154,7 @@ const expectations = [
},
'selector': 'body > section > div#aria-command-name',
'snippet': '<div id="aria-command-name" role="button">',
'explanation': 'Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute\n Element does not have text that is visible to screen readers',
'explanation': 'Fix any of the following:\n Element does not have text that is visible to screen readers\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute',
'nodeLabel': 'div',
},
},
Expand All @@ -174,7 +174,7 @@ const expectations = [
},
'selector': 'body > section > div#aria-tooltip-name',
'snippet': '<div id="aria-tooltip-name" role="tooltip">',
'explanation': 'Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute\n Element does not have text that is visible to screen readers',
'explanation': 'Fix any of the following:\n Element does not have text that is visible to screen readers\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute',
'nodeLabel': 'div',
},
},
Expand Down Expand Up @@ -239,7 +239,7 @@ const expectations = [
'selector': 'body > section > div#aria-required-attr',
'path': '2,HTML,1,BODY,19,SECTION,0,DIV',
'snippet': '<div id="aria-required-attr" role="checkbox">',
'explanation': 'Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute\n Element does not have text that is visible to screen readers',
'explanation': 'Fix any of the following:\n Element does not have text that is visible to screen readers\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute',
'nodeLabel': 'div',
},
},
Expand Down Expand Up @@ -314,7 +314,7 @@ const expectations = [
'type': 'node',
'selector': 'body > section > button#button-name',
'snippet': '<button id="button-name">',
'explanation': 'Fix any of the following:\n Element does not have inner text that is visible to screen readers\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element\'s default semantics were not overridden with role="none" or role="presentation"\n Element has no title attribute',
'explanation': 'Fix any of the following:\n Element does not have inner text that is visible to screen readers\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute\n Element\'s default semantics were not overridden with role="none" or role="presentation"',
'nodeLabel': 'button',
},
},
Expand Down Expand Up @@ -456,7 +456,7 @@ const expectations = [
'type': 'node',
'selector': 'body > section > iframe#frame-title',
'snippet': '<iframe id="frame-title">',
'explanation': 'Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute\n Element\'s default semantics were not overridden with role="none" or role="presentation"',
'explanation': 'Fix any of the following:\n Element has no title attribute\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element\'s default semantics were not overridden with role="none" or role="presentation"',
'nodeLabel': 'iframe',
},
},
Expand Down
3 changes: 3 additions & 0 deletions lighthouse-core/gather/gatherers/accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ async function runA11yChecks() {
'svg-img-alt': {enabled: false},
'audio-caption': {enabled: false},
'aria-treeitem-name': {enabled: true},
// https://github.com/dequelabs/axe-core/issues/2958
'nested-interactive': {enabled: false},
Copy link
Member

@brendankenny brendankenny May 27, 2021

Choose a reason for hiding this comment

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

'frame-focusable-content': {enabled: false} too so we aren't wasting time on it

Copy link
Member

Choose a reason for hiding this comment

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

'frame-focusable-content': {enabled: false} too so we aren't wasting time on it

that was meant to be a question, I don't feel strongly about it :)

Not having axe tests running without any use of their output is the only real argument for disabling

'frame-focusable-content': {enabled: false},
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ describe('ReportRenderer', () => {
global.Element = undefined;
});

it('renders without axe violations', (done) => {
it('renders without axe violations', () => {
const container = renderer._dom._document.createElement('main');
const output = renderer.renderReport(sampleResults, container);
renderer._dom._document.body.appendChild(container);
Expand All @@ -311,15 +311,18 @@ describe('ReportRenderer', () => {
'link-in-text-block': {enabled: false},
// Report has empty links prior to i18n-ing.
'link-name': {enabled: false},
// May not be a real issue. https://github.com/dequelabs/axe-core/issues/2958
'nested-interactive': {enabled: false},
},
};

axe.run(output, config, (error, {violations}) => {
assert.ifError(error);
assert.ok(violations.length === 0, JSON.stringify(violations, null, 1));
done();
return new Promise(resolve => {
axe.run(output, config, (error, {violations}) => {
expect(error).toBeNull();
expect(violations).toEqual([]);
resolve();
});
});

// Set timeout to 10s to give axe-core enough time to complete
// https://github.com/dequelabs/axe-core/tree/b573b1c1/doc/examples/jest_react#timeout-issues
}, /* timeout= */ 10 * 1000);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"webtreemap-cdt": "^3.2.0"
},
"dependencies": {
"axe-core": "4.1.3",
"axe-core": "4.2.1",
"chrome-launcher": "^0.14.0",
"configstore": "^5.0.1",
"csp_evaluator": "^1.0.1",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1370,10 +1370,10 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==

axe-core@4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.1.3.tgz#64a4c85509e0991f5168340edc4bedd1ceea6966"
integrity sha512-vwPpH4Aj4122EW38mxO/fxhGKtwWTMLDIJfZ1He0Edbtjcfna/R3YB67yVhezUMzqc3Jr3+Ii50KRntlENL4xQ==
axe-core@4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.2.1.tgz#2e50bcf10ee5b819014f6e342e41e45096239e34"
integrity sha512-evY7DN8qSIbsW2H/TWQ1bX3sXN1d4MNb5Vb4n7BzPuCwRHdkZ1H2eNLuSh73EoQqkGKUtju2G2HCcjCfhvZIAA==

babel-jest@^26.6.3:
version "26.6.3"
Expand Down