Skip to content

chore: Test against ARIA practices#3144

Merged
straker merged 10 commits intodevelopfrom
aria-practices2
Nov 9, 2021
Merged

chore: Test against ARIA practices#3144
straker merged 10 commits intodevelopfrom
aria-practices2

Conversation

@WilcoFiers
Copy link
Copy Markdown
Contributor

@WilcoFiers WilcoFiers commented Sep 2, 2021

One of the more common reasons for reported false positives comes from axe-core failing something recommended in the ARIA practices. This PR adds a test script will have axe-core running against the ARIA practices.

  • Set up basic test script
  • Open issues for problems discovered in the test:apg
  • Lock the APG dependency to a fix commit for stable testing
  • Set up CI, including a nightly test where we're running against the latest on #main

Closes issue: #2918

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Sep 2, 2021

CLA assistant check
All committers have signed the CLA.

@WilcoFiers WilcoFiers requested a review from straker September 2, 2021 12:20
@WilcoFiers
Copy link
Copy Markdown
Contributor Author

PR is blocked until the aria-practices removes husky from its postinstall script. I opened a PR for that: w3c/aria-practices#2033

@WilcoFiers WilcoFiers marked this pull request as ready for review November 5, 2021 18:16
@WilcoFiers WilcoFiers requested a review from a team as a code owner November 5, 2021 18:16
jobs:
- dependencies_unix
- test_nightly:
- test_nightly_chrome:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How will we know if/when this fails? Is there someone responsible for checking CI logs daily?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, those get kicked out to our #attest-build channel on Slack.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I also get emails every night about the run and see if they pass/fail

unix_box: &unix_box
docker:
- image: circleci/node:10-browsers
- image: circleci/node:16-browsers
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So that we get access to Chrome 95

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just an fyi, circle is changing how they tag their images (should be cimg/node:16.13-browsers https://circleci.com/developer/images/image/cimg/node). I'll update the tag in another pr because we can also specify using lts-browsers which I think would be good to test on our nightly builds

unix_box: &unix_box
docker:
- image: circleci/node:10-browsers
- image: circleci/node:16-browsers
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just an fyi, circle is changing how they tag their images (should be cimg/node:16.13-browsers https://circleci.com/developer/images/image/cimg/node). I'll update the tag in another pr because we can also specify using lts-browsers which I think would be good to test on our nightly builds

jobs:
- dependencies_unix
- test_nightly:
- test_nightly_chrome:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I also get emails every night about the run and see if they pass/fail

"fmt": "prettier --write .*.json *.{json,md,js} **/*.ts './{.circleci,.github,build,doc,lib,locales,test,typings}/**/*.{json,md,js,ts,html}'"
},
"devDependencies": {
"@axe-core/webdriverjs": "^4.2.2",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a circular dependency, will this cause any problems (probably not, but want to make absolutely sure)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Don't think so. It's a dev dependency.

"@babel/preset-env": "^7.5.4",
"@deque/dot": "^1.1.5",
"act-rules.github.io": "github:act-rules/act-rules.github.io#master",
"aria-practices": "github:w3c/aria-practices#f7de7ec3a53534018237f24cb9e610f26c30c367",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How often should we update the commit hash?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was thinking that if nightly fails, we take another look. Don't think we need to do it more often than that.

const port = 9515;
let driver, server, addr, axeSource;
this.timeout(50000);
this.retries(3);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was this failing a lot that it needed retries?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not entirely sure. I did see it failing once or twice for a reason I couldn't figure out. Don't know for sure what the reason of that was. Don't think having this here hurts.

'region', // dequelabs/axe-core#3260
'heading-order', // APG issues
'list', // APG issues
'scrollable-region-focusable', // w3c/aria-practices#2114
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like these comments a lot. Thanks for adding them.

await new Promise(r => setTimeout(r, 500));
await connectToChromeDriver(port);

const app = express();
Copy link
Copy Markdown
Contributor

@straker straker Nov 8, 2021

Choose a reason for hiding this comment

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

Are any of the test files using absolute paths? If not I think our npm run start command should serve node_modules directly as well, so we might not need express for this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fair point, let me see if I can make that work.

straker
straker previously requested changes Nov 9, 2021
Co-authored-by: Steven Lambert <2433219+straker@users.noreply.github.com>
"@babel/preset-env": "^7.5.4",
"@deque/dot": "^1.1.5",
"act-rules.github.io": "github:act-rules/act-rules.github.io#master",
"aria-practices": "github:w3c/aria-practices#f7de7ec3a53534018237f24cb9e610f26c30c367",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was thinking that if nightly fails, we take another look. Don't think we need to do it more often than that.

const port = 9515;
let driver, server, addr, axeSource;
this.timeout(50000);
this.retries(3);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not entirely sure. I did see it failing once or twice for a reason I couldn't figure out. Don't know for sure what the reason of that was. Don't think having this here hurts.

await new Promise(r => setTimeout(r, 500));
await connectToChromeDriver(port);

const app = express();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fair point, let me see if I can make that work.

npm run test -- --browsers Chrome,FirefoxNightly

# Run the test suite for nightly builds.
test_nightly_aria_practices:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We should do this same nightly thing with ACT rules. I'll open that PR when this is merged.

@straker straker merged commit ed9ef99 into develop Nov 9, 2021
@straker straker deleted the aria-practices2 branch November 9, 2021 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants