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

feat: bump axe core to 4.2.1 and fix unit test's failures #169

Merged
merged 1 commit into from
Jun 2, 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
57 changes: 27 additions & 30 deletions __tests__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ Fix any of the following:
Element does not have an alt attribute
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute or the title attribute is empty
Element's default semantics were not overridden with role=\\"presentation\\"
Element's default semantics were not overridden with role=\\"none\\"
Element has no title attribute
Element's default semantics were not overridden with role=\\"none\\" or role=\\"presentation\\"

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/image-alt?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/image-alt?application=axeAPI

────────

Expand All @@ -30,13 +29,13 @@ Expected the HTML found at $('img') to have no violations:

Received:

\\"All page content must be contained by landmarks (region)\\"
\\"All page content should be contained by landmarks (region)\\"

Fix any of the following:
Some page content is not contained by landmarks

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/region?application=axeAPI"
https://dequeuniversity.com/rules/axe/4.2/region?application=axeAPI"
`;

exports[`jest-axe toHaveNoViolations returns correctly formatted message when violations are present 1`] = `
Expand Down Expand Up @@ -77,12 +76,11 @@ Fix any of the following:
Element does not have an alt attribute
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute or the title attribute is empty
Element's default semantics were not overridden with role=\\"presentation\\"
Element's default semantics were not overridden with role=\\"none\\"
Element has no title attribute
Element's default semantics were not overridden with role=\\"none\\" or role=\\"presentation\\"

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/image-alt?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/image-alt?application=axeAPI

Expected the HTML found at $('img[src=\\"http\\\\:\\\\/\\\\/example\\\\.com\\\\/2\\"]') to have no violations:

Expand All @@ -96,12 +94,11 @@ Fix any of the following:
Element does not have an alt attribute
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute or the title attribute is empty
Element's default semantics were not overridden with role=\\"presentation\\"
Element's default semantics were not overridden with role=\\"none\\"
Element has no title attribute
Element's default semantics were not overridden with role=\\"none\\" or role=\\"presentation\\"

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/image-alt?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/image-alt?application=axeAPI

────────

Expand All @@ -114,14 +111,16 @@ Received:
\\"Form elements must have labels (label)\\"

Fix any of the following:
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Form element does not have an implicit (wrapped) <label>
Form element does not have an explicit <label>
Element has no title attribute or the title attribute is empty
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute
Element has no placeholder attribute
Element's default semantics were not overridden with role=\\"none\\" or role=\\"presentation\\"

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/label?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI

────────

Expand All @@ -140,11 +139,10 @@ Fix any of the following:
Element does not have text that is visible to screen readers
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element's default semantics were not overridden with role=\\"presentation\\"
Element's default semantics were not overridden with role=\\"none\\"
Element has no title attribute

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/link-name?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/link-name?application=axeAPI

Expected the HTML found at $('a[href$=\\"\\\\#link-name-2\\"]') to have no violations:

Expand All @@ -161,11 +159,10 @@ Fix any of the following:
Element does not have text that is visible to screen readers
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element's default semantics were not overridden with role=\\"presentation\\"
Element's default semantics were not overridden with role=\\"none\\"
Element has no title attribute

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/link-name?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/link-name?application=axeAPI

────────

Expand All @@ -175,39 +172,39 @@ Expected the HTML found at $('img[src$=\\"example\\\\.com\\"]') to have no viola

Received:

\\"All page content must be contained by landmarks (region)\\"
\\"All page content should be contained by landmarks (region)\\"

Fix any of the following:
Some page content is not contained by landmarks

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/region?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/region?application=axeAPI

Expected the HTML found at $('img[src=\\"http\\\\:\\\\/\\\\/example\\\\.com\\\\/2\\"]') to have no violations:

<img src=\\"http://example.com/2\\">

Received:

\\"All page content must be contained by landmarks (region)\\"
\\"All page content should be contained by landmarks (region)\\"

Fix any of the following:
Some page content is not contained by landmarks

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/region?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/region?application=axeAPI

Expected the HTML found at $('input') to have no violations:

<input type=\\"text\\">

Received:

\\"All page content must be contained by landmarks (region)\\"
\\"All page content should be contained by landmarks (region)\\"

Fix any of the following:
Some page content is not contained by landmarks

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/region?application=axeAPI"
https://dequeuniversity.com/rules/axe/4.2/region?application=axeAPI"
`;
29 changes: 13 additions & 16 deletions __tests__/__snapshots__/reactjs.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ Fix any of the following:
Element does not have an alt attribute
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute or the title attribute is empty
Element's default semantics were not overridden with role=\\"presentation\\"
Element's default semantics were not overridden with role=\\"none\\"
Element has no title attribute
Element's default semantics were not overridden with role=\\"none\\" or role=\\"presentation\\"

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/image-alt?application=axeAPI"
https://dequeuniversity.com/rules/axe/4.2/image-alt?application=axeAPI"
`;

exports[`React renders correctly 1`] = `
Expand All @@ -38,12 +37,11 @@ Fix any of the following:
Element does not have an alt attribute
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute or the title attribute is empty
Element's default semantics were not overridden with role=\\"presentation\\"
Element's default semantics were not overridden with role=\\"none\\"
Element has no title attribute
Element's default semantics were not overridden with role=\\"none\\" or role=\\"presentation\\"

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/image-alt?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/image-alt?application=axeAPI

────────

Expand All @@ -53,13 +51,13 @@ Expected the HTML found at $('img') to have no violations:

Received:

\\"All page content must be contained by landmarks (region)\\"
\\"All page content should be contained by landmarks (region)\\"

Fix any of the following:
Some page content is not contained by landmarks

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/region?application=axeAPI"
https://dequeuniversity.com/rules/axe/4.2/region?application=axeAPI"
`;

exports[`React renders with enzyme wrapper correctly 1`] = `
Expand All @@ -77,12 +75,11 @@ Fix any of the following:
Element does not have an alt attribute
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute or the title attribute is empty
Element's default semantics were not overridden with role=\\"presentation\\"
Element's default semantics were not overridden with role=\\"none\\"
Element has no title attribute
Element's default semantics were not overridden with role=\\"none\\" or role=\\"presentation\\"

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/image-alt?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/image-alt?application=axeAPI

────────

Expand All @@ -92,11 +89,11 @@ Expected the HTML found at $('img') to have no violations:

Received:

\\"All page content must be contained by landmarks (region)\\"
\\"All page content should be contained by landmarks (region)\\"

Fix any of the following:
Some page content is not contained by landmarks

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/region?application=axeAPI"
https://dequeuniversity.com/rules/axe/4.2/region?application=axeAPI"
`;
18 changes: 8 additions & 10 deletions __tests__/__snapshots__/vuejs.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ Fix any of the following:
Element does not have an alt attribute
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute or the title attribute is empty
Element's default semantics were not overridden with role=\\"presentation\\"
Element's default semantics were not overridden with role=\\"none\\"
Element has no title attribute
Element's default semantics were not overridden with role=\\"none\\" or role=\\"presentation\\"

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/image-alt?application=axeAPI"
https://dequeuniversity.com/rules/axe/4.2/image-alt?application=axeAPI"
`;

exports[`Vue renders correctly 1`] = `
Expand All @@ -38,12 +37,11 @@ Fix any of the following:
Element does not have an alt attribute
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute or the title attribute is empty
Element's default semantics were not overridden with role=\\"presentation\\"
Element's default semantics were not overridden with role=\\"none\\"
Element has no title attribute
Element's default semantics were not overridden with role=\\"none\\" or role=\\"presentation\\"

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/image-alt?application=axeAPI
https://dequeuniversity.com/rules/axe/4.2/image-alt?application=axeAPI

────────

Expand All @@ -53,11 +51,11 @@ Expected the HTML found at $('#test-image') to have no violations:

Received:

\\"All page content must be contained by landmarks (region)\\"
\\"All page content should be contained by landmarks (region)\\"

Fix any of the following:
Some page content is not contained by landmarks

You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.0/region?application=axeAPI"
https://dequeuniversity.com/rules/axe/4.2/region?application=axeAPI"
`;
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"node": ">= 10.0.0"
},
"dependencies": {
"axe-core": "4.0.1",
"axe-core": "^4.2.1",
"chalk": "4.1.0",
"jest-matcher-utils": "26.6.1",
"lodash.merge": "4.6.2"
Expand Down