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(axe-core-4.9.1): update to use axe-core 4.9.1 #1322

Merged
merged 6 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"resolutions": {
"ansi-regex@^4.1.0": "^5.0.1",
"axe-core": "4.8.4",
"axe-core": "4.9.1",
"chromedriver": "^119.0.1"
},
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1388,15 +1388,15 @@ Object {
],
"tool": Object {
"driver": Object {
"downloadUri": "https://www.npmjs.com/package/axe-core/v/4.8.4",
"fullName": "axe for Web v4.8.4",
"downloadUri": "https://www.npmjs.com/package/axe-core/v/4.9.1",
"fullName": "axe for Web v4.9.1",
"informationUri": "https://www.deque.com/axe/axe-for-web/",
"name": "axe-core",
"properties": Object {
"microsoft/qualityDomain": "Accessibility",
},
"rules": Array [],
"semanticVersion": "4.8.4",
"semanticVersion": "4.9.1",
"shortDescription": Object {
"text": "An open source accessibility rules library for automated testing.",
},
Expand All @@ -1407,7 +1407,7 @@ Object {
"name": "WCAG",
},
],
"version": "4.8.4",
"version": "4.9.1",
},
},
},
Expand Down
6 changes: 5 additions & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ describe('public convertAxeToSarif API', () => {
${'basic-axe-v4.8.4.reporter-v2.json'} | ${'basic-axe-v4.8.4.sarif'}
${'w3citylights-axe-v4.8.4.reporter-v1.json'} | ${'w3citylights-axe-v4.8.4.sarif'}
${'w3citylights-axe-v4.8.4.reporter-v2.json'} | ${'w3citylights-axe-v4.8.4.sarif'}
${'basic-axe-v4.9.1.reporter-v1.json'} | ${'basic-axe-v4.9.1.sarif'}
${'basic-axe-v4.9.1.reporter-v2.json'} | ${'basic-axe-v4.9.1.sarif'}
${'w3citylights-axe-v4.9.1.reporter-v1.json'} | ${'w3citylights-axe-v4.9.1.sarif'}
${'w3citylights-axe-v4.9.1.reporter-v2.json'} | ${'w3citylights-axe-v4.9.1.sarif'}
`(
'converts pinned v1/v2 input $inputFile to pinned output $outputFile',
({ inputFile, outputFile }) => {
Expand Down Expand Up @@ -165,7 +169,7 @@ describe('public sarifReporter API', () => {
// it isn't very meaningful to test cases that involve old axe versions here.
it.each`
inputFile | outputFile
${'basic-axe-v4.8.4.reporter-raw.json'} | ${'basic-axe-v4.8.4.sarif'}
${'basic-axe-v4.9.1.reporter-raw.json'} | ${'basic-axe-v4.9.1.sarif'}
`(
'converts pinned raw input $inputFile to pinned output $outputFile',
async ({ inputFile, outputFile }) => {
Expand Down
57 changes: 57 additions & 0 deletions src/test-resources/basic-axe-v4.9.1.reporter-raw.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[
{
"id": "document-title",
"result": "failed",
"pageLevel": false,
"impact": "serious",
"tags": [
"cat.text-alternatives",
"wcag2a",
"wcag242",
"TTv5",
"TT12.a",
"EN-301-549",
"EN-9.2.4.2",
"ACT"
],
"description": "Ensures each HTML document contains a non-empty <title> element",
"help": "Documents must have <title> element to aid in navigation",
"helpUrl": "https://dequeuniversity.com/rules/axe/4.9/document-title?application=axe-puppeteer",
"inapplicable": [],
"passes": [],
"incomplete": [],
"violations": [
{
"any": [
{
"id": "doc-has-title",
"data": null,
"impact": "serious",
"message": "Document does not have a non-empty <title> element",
"relatedNodes": []
}
],
"all": [],
"none": [],
"impact": "serious",
"result": "failed",
"node": {
"selector": [
"html"
],
"source": "<html><head></head><body>\n</body></html>",
"xpath": [
"/html"
],
"ancestry": [
"html"
],
"nodeIndexes": [
0
],
"fromFrame": false
}
}
]
}
]
74 changes: 74 additions & 0 deletions src/test-resources/basic-axe-v4.9.1.reporter-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"testEngine": {
"name": "axe-core",
"version": "4.9.1"
},
"testRunner": {
"name": "axe"
},
"testEnvironment": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4950.0 Safari/537.36",
"windowWidth": 800,
"windowHeight": 600,
"orientationAngle": 0,
"orientationType": "portrait-primary"
},
"timestamp": "2000-01-02T03:04:05.006Z",
"url": "http://localhost/",
"toolOptions": {
"xpath": true,
"runOnly": {
"type": "rule",
"values": [
"document-title"
]
},
"reporter": "v1"
},
"inapplicable": [],
"passes": [],
"incomplete": [],
"violations": [
{
"id": "document-title",
"impact": "serious",
"tags": [
"cat.text-alternatives",
"wcag2a",
"wcag242",
"TTv5",
"TT12.a",
"EN-301-549",
"EN-9.2.4.2",
"ACT"
],
"description": "Ensures each HTML document contains a non-empty <title> element",
"help": "Documents must have <title> element to aid in navigation",
"helpUrl": "https://dequeuniversity.com/rules/axe/4.9/document-title?application=axe-puppeteer",
"nodes": [
{
"any": [
{
"id": "doc-has-title",
"data": null,
"relatedNodes": [],
"impact": "serious",
"message": "Document does not have a non-empty <title> element"
}
],
"all": [],
"none": [],
"impact": "serious",
"html": "<html><head></head><body>\n</body></html>",
"target": [
"html"
],
"xpath": [
"/html"
],
"failureSummary": "Fix any of the following:\n Document does not have a non-empty <title> element"
}
]
}
]
}
73 changes: 73 additions & 0 deletions src/test-resources/basic-axe-v4.9.1.reporter-v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"testEngine": {
"name": "axe-core",
"version": "4.9.1"
},
"testRunner": {
"name": "axe"
},
"testEnvironment": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4950.0 Safari/537.36",
"windowWidth": 800,
"windowHeight": 600,
"orientationAngle": 0,
"orientationType": "portrait-primary"
},
"timestamp": "2000-01-02T03:04:05.006Z",
"url": "http://localhost/",
"toolOptions": {
"xpath": true,
"runOnly": {
"type": "rule",
"values": [
"document-title"
]
},
"reporter": "v2"
},
"inapplicable": [],
"passes": [],
"incomplete": [],
"violations": [
{
"id": "document-title",
"impact": "serious",
"tags": [
"cat.text-alternatives",
"wcag2a",
"wcag242",
"TTv5",
"TT12.a",
"EN-301-549",
"EN-9.2.4.2",
"ACT"
],
"description": "Ensures each HTML document contains a non-empty <title> element",
"help": "Documents must have <title> element to aid in navigation",
"helpUrl": "https://dequeuniversity.com/rules/axe/4.9/document-title?application=axe-puppeteer",
"nodes": [
{
"any": [
{
"id": "doc-has-title",
"data": null,
"relatedNodes": [],
"impact": "serious",
"message": "Document does not have a non-empty <title> element"
}
],
"all": [],
"none": [],
"impact": "serious",
"html": "<html><head></head><body>\n</body></html>",
"target": [
"html"
],
"xpath": [
"/html"
]
}
]
}
]
}
Loading