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

build: update to axe v4.2 #67

Merged
merged 18 commits into from
Jun 30, 2021

Conversation

mohanraj-r
Copy link
Contributor

@mohanraj-r mohanraj-r commented Jun 23, 2021

Build 🏗️

  • Update to axe v4.2.3
    • without adding the new rules (will be tackled in a future PR)
    • this brings in dozens of bug fixes in recent axe release
    • update test snapshots to reflect version changes in axe help URL
    • update tests to account for removed rule (bypass)

@mohanraj-r mohanraj-r self-assigned this Jun 23, 2021
@mohanraj-r mohanraj-r requested a review from a team as a code owner June 23, 2021 03:15
@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #67 (266f142) into master (120fe16) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #67   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          234       235    +1     
  Branches        31        31           
=========================================
+ Hits           234       235    +1     
Impacted Files Coverage Δ
packages/test-utils/src/test-data.ts 100.00% <100.00%> (ø)
packages/test-utils/src/utils.ts 100.00% <100.00%> (ø)

@mohanraj-r
Copy link
Contributor Author

Will investigate the codecov drop..

@mohanraj-r mohanraj-r changed the title build: update to axe v4.2, Jest v27 build: update to axe v4.2 Jun 23, 2021
@mohanraj-r
Copy link
Contributor Author

Had to revert back to Jest v26 from attempted upgrade to v27 due to inconsistencies in code cov reports as noted in #65

@@ -46,7 +46,7 @@ describe('toBeAccessible jest a11y matcher', () => {

it.each(a11yConfigParams)('should throw error for dom with a11y issues with config: %#', async (config) => {
document.body.innerHTML = domWithA11yIssues;
expect.assertions(a11yIssuesCount);
expect.assertions(a11yIssuesCount + 1);

Choose a reason for hiding this comment

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

why the +1 here now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch :)
The test has 6 assertions, and a11yIssuesCount was changed from 6 to 5 in this PR to account for the removed bypass rule. But this test doesn't actually check for num of a11y issues - think it was a coincidence that the num of issues matched the num of assertions.

Removed the expectation and added a hasAssertions check to the utils method that is using the async calls.

trevor-bliss
trevor-bliss previously approved these changes Jun 23, 2021
that somehow got messed up in a recent change to update links to v4.2
trevor-bliss
trevor-bliss previously approved these changes Jun 24, 2021
@mohanraj-r
Copy link
Contributor Author

@trevor-bliss Can you please review the latest changes. I accidentally dismissed your approval.

Copy link

@trevor-bliss trevor-bliss left a comment

Choose a reason for hiding this comment

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

Let's make sure to follow up to understand why the a11y checks don't work with Jest's fake timers.

@mohanraj-r mohanraj-r merged commit 9f5fc5c into salesforce:master Jun 30, 2021
@mohanraj-r mohanraj-r deleted the build_update_axe_v4.2 branch June 30, 2021 18:09
@mohanraj-r mohanraj-r restored the build_update_axe_v4.2 branch June 30, 2021 18:09
@mohanraj-r mohanraj-r deleted the build_update_axe_v4.2 branch June 30, 2021 18:22
@mohanraj-r
Copy link
Contributor Author

Opened issue in axe-core dequelabs/axe-core#3055

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.

2 participants