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

Skip selector calculation of non-violation results #19

Merged
merged 2 commits into from Apr 22, 2020
Merged

Skip selector calculation of non-violation results #19

merged 2 commits into from Apr 22, 2020

Conversation

tsmd
Copy link
Contributor

@tsmd tsmd commented Apr 13, 2020

It takes a very long time to inspect a huge page with a large number of nodes.

According to the official documentation, one of the reasons it takes so long to process is the selector calculation. It takes time because the calculations are performed not only for the items that failed the test, but also for the items that passed the test.
https://github.com/dequelabs/axe-core/blob/master/doc/API.md#section-4-performance

In vue-axe, we only use violations results among all results. The resultType should be set to ["violations"] in order to avoid unnecessary calculations.

@ktquez
Copy link
Member

ktquez commented Apr 21, 2020

Hello @tsmd, how are you?

Thank you for your contribution!

Can you make this dynamic, which can be passed at the time of installation, through the options?

@tsmd
Copy link
Contributor Author

tsmd commented Apr 21, 2020

@ktquez
Thank you!

I've changed the options to be dynamic.
I've also updated the documentation.
The resultTypes option is set to ['violations'] by default. This is because any types other than violations are ineffective in the current vue-axe.

Can you check again, please?

@ktquez ktquez merged commit f34773b into vue-a11y:master Apr 22, 2020
@ktquez
Copy link
Member

ktquez commented Apr 22, 2020

@tsmd Done!

Now available in v1.1.0
Thanks.

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.

None yet

2 participants