Description
Axe-core's resultTypes
run option can tell axe not to return pass
and incomplete
. Doing so improve's axe-core's performance a bit. Generating selectors for elements is quite a slow operation. So if axe doesn't need selectors for pass and incomplete results, this saves up some time.
Axe-core generates selectors for elements in three places:
- in axe.run, as part of the reporter
- when partial results get sent to the parent frame
- at the end of runPartial
Currently, resultTypes
is only used in the reporter (1). This means selectors get generated for nodes that may get filtered by the reporter at a later stage. It also means lots of passes are returned by runPartial, and frameMessenger that later get ignored. This results in a lot of unnecessary data getting sent between frames too.
This can be improved by having Audit.run
filter its results before passing them back, either to the parent frame or to runPartial. This will have to consider which checks have after methods on them. Passes on checks with after methods can be changed to fails later. But this is a relatively small subset of checks.
Bonus points
If incomplete
is turned off by resultTypes then I think all reviewOnFail
rules should be disabled. There's no reason to run those if incomplete results are just going to get filtered.