Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There have been quite a number of axe-core updates since v2.6.1, including numerous bug fixes, additional rules and rule updates, and performance optimizations. As such, it is imperative that an organization getting started with accessibility testing is able to take advantage of new features provided in the latest release of axe-core.
This pull request facilitates the axe-core version upgrade to 3.1.2. Axe-component.js has been updated to use the newer axe.run API method (a11yCheck has been deprecated), and updated the callback function signature (first argument is now an error object, second argument is the audit result). Related tests have also be updated to reflect these changes.
One particular aspect to take note related to axe-core v3, is that concurrent axe calls, such as those that are made in the component audit, result in numerous exceptions as detailed under dequelabs/axe-core#1041. I've created a new service (concurrent-axe.js) which mitigates the issue by deferring subsequent axe.run calls. Fortunately, this issue does not occur when axe is run from within tests.
I've also fixed the demo page, which didn't seem to properly update the UI with its corresponding visual noise level. The issue was occurring due to the fact that the violations-grid-item component was also executing an axe audit on its content, which in turn override the nested component's visuals. This was easily mitigated by disabling audit on the violations-grid-item component. Additionally, the "Level 3" checkbox was broken due to incorrect ID assignment.
I've verified that all changes pass tests and demo page works as expected.