Skip to content

Commit

Permalink
feat(axe-core-4.6): Update to axe-core 4.6.3, enabling link-in-text-b…
Browse files Browse the repository at this point in the history
…lock, meta-viewport, and "Related paths" in reports (#2383)

#### Details

This PR:

* Updates `axe-core` to v4.6.3
* Updates `accessibility-insights-report` to corresponding v4.6.3
* Removes `link-in-text-block` and `meta-viewport` from the rule
exclusion list, matching the new AI4Web behavior enabling them as
automated checks
* Enables a new report feature to include "Related paths" for failure
cards of axe results with "relatedNodes" info by propogating this axe
property in `combined-report-data-converter.ts`
* Bumps the `accessibility-insights-scan` minor version to `1.6.0` in
anticipation of a corresponding release for that package

Screenshot of combined report segment with new Related paths UX
generated using the following CLI command in this PR branch: `node
C:\repos\accessibility-insights-service\packages\cli\dist\ai-scan-cli.js
--crawl --url
https://developer.microsoft.com/en-us/fluentui#/controls/web/detailslist
--maxUrls 5`

![screenshot highlighting new "Related paths" field in a failure card in
a combined
report](https://user-images.githubusercontent.com/376284/216456916-648a9aaa-c18e-4a6a-b8cd-b1b741d1799a.png)


##### Motivation

Keep service rules version in sync with AI4Web, which has begun release
validation today for its corresponding release (2.37.0)

##### Context

* [web 4.6.3 PR
(#6334)](microsoft/accessibility-insights-web#6334)
* [web "Related paths" PR with screenshots of new report UI
(#6388)](microsoft/accessibility-insights-web#6388)

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->

- [x] Addresses an existing issue: 2017450
- [x] Added relevant unit test for your changes. (`yarn test`)
- [x] Verified code coverage for the changes made. Check coverage report
at: `<rootDir>/test-results/unit/coverage`
- [x] Ran precheckin (`yarn precheckin`)
- [ ] Validated in an Azure resource group
  • Loading branch information
dbjorge authored Feb 2, 2023
1 parent efdc129 commit 49d163b
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 40 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@npmcli/git": ">=2.1.0",
"ansi-regex": "5.0.1",
"async": ">=3.2.2",
"axe-core": "4.4.1",
"axe-core": "4.6.3",
"glob-parent": ">=5.1.2",
"json-schema": ">=0.4.0",
"minimist": ">=1.2.6",
Expand All @@ -84,7 +84,7 @@
"tar": ">=6.1.9"
},
"dependencies": {
"accessibility-insights-report": "4.4.1"
"accessibility-insights-report": "4.6.3"
},
"packageManager": "yarn@3.2.2"
}
4 changes: 2 additions & 2 deletions packages/axe-result-converter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"typescript": "^4.9.4"
},
"dependencies": {
"accessibility-insights-report": "4.4.1",
"axe-core": "4.4.1",
"accessibility-insights-report": "4.6.3",
"axe-core": "4.6.3",
"common": "workspace:*",
"inversify": "^6.0.1",
"lodash": "^4.17.21",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ Object {
"data": "check-data-node-31",
"id": "check-id-node-31",
"message": "check-message-node-31",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-31",
"target": Array [
"check-related-nodes-target-node-31",
],
},
],
},
],
"failureSummary": "failureSummary-node-31",
Expand Down Expand Up @@ -47,6 +55,14 @@ Object {
"data": "check-data-node-32",
"id": "check-id-node-32",
"message": "check-message-node-32",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-32",
"target": Array [
"check-related-nodes-target-node-32",
],
},
],
},
],
"failureSummary": "failureSummary-node-32",
Expand Down Expand Up @@ -75,6 +91,14 @@ Object {
"data": "check-data-node-33",
"id": "check-id-node-33",
"message": "check-message-node-33",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-33",
"target": Array [
"check-related-nodes-target-node-33",
],
},
],
},
],
"failureSummary": "failureSummary-node-33",
Expand Down Expand Up @@ -107,6 +131,14 @@ Object {
"data": "check-data-node-12",
"id": "check-id-node-12",
"message": "check-message-node-12",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-12",
"target": Array [
"check-related-nodes-target-node-12",
],
},
],
},
],
"failureSummary": "failureSummary-node-12",
Expand Down Expand Up @@ -135,6 +167,14 @@ Object {
"data": "check-data-node-22",
"id": "check-id-node-22",
"message": "check-message-node-22",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-22",
"target": Array [
"check-related-nodes-target-node-22",
],
},
],
},
],
"failureSummary": "failureSummary-node-22",
Expand Down Expand Up @@ -167,6 +207,14 @@ Object {
"data": "check-data-node-41",
"id": "check-id-node-41",
"message": "check-message-node-41",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-41",
"target": Array [
"check-related-nodes-target-node-41",
],
},
],
},
],
"failureSummary": "failureSummary-node-41",
Expand Down Expand Up @@ -206,6 +254,14 @@ Object {
"data": "check-data-node-11",
"id": "check-id-node-11",
"message": "check-message-node-11",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-11",
"target": Array [
"check-related-nodes-target-node-11",
],
},
],
},
],
"failureSummary": "failureSummary-node-11",
Expand Down Expand Up @@ -301,6 +357,14 @@ Object {
"data": "check-data-node-1",
"id": "check-id-node-1",
"message": "check-message-node-1",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-1",
"target": Array [
"check-related-nodes-target-node-1",
],
},
],
},
],
"failureSummary": "failureSummary-node-1",
Expand Down Expand Up @@ -330,6 +394,14 @@ Object {
"data": "check-data-node-2",
"id": "check-id-node-2",
"message": "check-message-node-2",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-2",
"target": Array [
"check-related-nodes-target-node-2",
],
},
],
},
],
"failureSummary": "failureSummary-node-2",
Expand Down Expand Up @@ -358,6 +430,14 @@ Object {
"data": "check-data-node-3",
"id": "check-id-node-3",
"message": "check-message-node-3",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-3",
"target": Array [
"check-related-nodes-target-node-3",
],
},
],
},
],
"failureSummary": "failureSummary-node-3",
Expand Down Expand Up @@ -386,6 +466,14 @@ Object {
"data": "check-data-node-4",
"id": "check-id-node-4",
"message": "check-message-node-4",
"relatedNodes": Array [
Object {
"html": "check-related-nodes-html-node-4",
"target": Array [
"check-related-nodes-target-node-4",
],
},
],
},
],
"failureSummary": "failureSummary-node-4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ const getAccumulatedNode = (nodeId: string) => {
id: `check-id-${nodeId}`,
data: `check-data-${nodeId}`,
message: `check-message-${nodeId}`,
relatedNodes: [
{
target: [`check-related-nodes-target-${nodeId}`],
html: `check-related-nodes-html-${nodeId}`,
},
],
},
],
all: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export class CombinedReportDataConverter {
id: nodeCheckResult?.id,
message: nodeCheckResult?.message,
data: nodeCheckResult?.data,
relatedNodes: nodeCheckResult?.relatedNodes,
});
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "accessibility-insights-scan",
"version": "1.5.2",
"version": "1.6.0",
"description": "This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.",
"scripts": {
"build": "webpack --config ./webpack.config.js \"$@\"",
Expand Down Expand Up @@ -62,11 +62,11 @@
"@axe-core/puppeteer": "^4.5.0",
"@medv/finder": "^2.1.0",
"@sindresorhus/fnv1a": "^2.0.1",
"accessibility-insights-report": "4.4.1",
"accessibility-insights-report": "4.6.3",
"ajv": "^8.11.2",
"apify": "^2.3.2",
"applicationinsights": "^2.3.1",
"axe-core": "4.4.1",
"axe-core": "4.6.3",
"browser-pool": "^3.1.4",
"cli-spinner": "^0.2.10",
"convict": "^6.2.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/crawler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
"dependencies": {
"@axe-core/puppeteer": "^4.5.0",
"@medv/finder": "^2.1.0",
"accessibility-insights-report": "4.4.1",
"accessibility-insights-report": "4.6.3",
"apify": "^2.3.2",
"axe-core": "4.4.1",
"axe-core": "4.6.3",
"browser-pool": "^3.1.4",
"common": "workspace:*",
"dotenv": "^16.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/scanner-global-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"@axe-core/puppeteer": "^4.5.0",
"axe-core": "4.4.1",
"axe-core": "4.6.3",
"common": "workspace:*",
"inversify": "^6.0.1",
"lodash": "^4.17.21",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ export class RuleExclusion {
'landmark-no-duplicate-main',
'landmark-one-main',
'landmark-unique',
'link-in-text-block',
'meta-viewport',
'meta-viewport-large',
'no-autoplay-audio',
'p-as-heading',
Expand Down
4 changes: 2 additions & 2 deletions packages/service-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
"@azure/functions": "^3.5.0",
"@azure/identity": "^3.1.2",
"@azure/storage-blob": "^12.12.0",
"accessibility-insights-report": "4.4.1",
"accessibility-insights-report": "4.6.3",
"async-mutex": "^0.3.2",
"axe-core": "4.4.1",
"axe-core": "4.6.3",
"axe-result-converter": "workspace:*",
"azure-services": "workspace:*",
"common": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions packages/web-api-scan-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
"@axe-core/puppeteer": "^4.5.0",
"@azure/cosmos": "^3.17.2",
"accessibility-insights-crawler": "workspace:*",
"accessibility-insights-report": "4.4.1",
"accessibility-insights-report": "4.6.3",
"apify": "^2.3.2",
"applicationinsights": "^2.3.1",
"axe-core": "4.4.1",
"axe-core": "4.6.3",
"axe-result-converter": "workspace:*",
"axe-sarif-converter": "^2.9.0",
"azure-services": "workspace:*",
Expand All @@ -80,7 +80,7 @@
"yargs": "^17.6.2"
},
"resolutions": {
"axe-core": "4.4.1"
"axe-core": "4.6.3"
},
"overrides": {
"apify": {
Expand Down
Loading

0 comments on commit 49d163b

Please sign in to comment.