Closed jeeyyy closed 6 years ago
We shouldn't "wait" for these assets to load. We can load them, while running rules that don't require these assets. That might have been your intention, but I think this should be explicit.
I think {preload: false}
should be an option of axe.run
, not of axe.configure
.
Symbol() isn't supported in IE9, so we can't really use that.
We need a way to set the preload timeout time. We could maybe reuse the preload option, if its an int, that will be the timeout, if falsey, it's off
For clarification, there are several rules that we need this for, not just WCAG 2.1 rules. An important feature request was to have Axe test the hover / focus state of rules. We can only do that with access to the CSSOM. This is expected to cut manual audit time quite substantially.
@WilcoFiers - updated proposal based on your comments.
I think
{preload: false}
should be an option ofaxe.run
, not ofaxe.configure
.
Just so everyone is on the same page, can you please elaborate on "why" here? It seems like axe.configure()
is the logical place to put configuration to me (just based on verbiage alone).
PR was merged. Hence closing the issue. An additional issue detailing the requirement for nested CSSOM is here - https://github.com/dequelabs/axe-core/issues/1054
Load external assets in axe-core:
Requirement:
In order to support both existing rules and upcoming new WCAG2.1 rules (Eg: issue https://github.com/dequelabs/axe-core/issues/851), there is a need to load external assets, in this case external stylesheets.
Having tried a few options as detailed in the issue to get hold of the assets, believe the best way to go ahead would be to introduce ability to load external assets in axe-core,.
Note: The assets can be loaded in parallel when axe is run against rules that are not dependent on external assets.
Considerations:
At this juncture although the need is only for the construction of CSSOM, there may be a need to support pre-fetching of external assets as support for newer rules are incorporated (Eg: AOM).
Suggestions:
preload: ['CSSOM']
, which defines dependencies of external assets.age.run
, like so:This will provide end-users of the library to easily control loading external assets.
Known Catches:
Some Preliminary Work:
Next steps: