When setting a default of ignoreUrl: true
, the pa11y()
function shouldn't require a url parameter
#535
Labels
ignoreUrl: true
, the pa11y()
function shouldn't require a url parameter
#535
Expected behaviour
options.page
exists, but there is no defaultpa11y.default.page
is not defined. This is not a huge deal, it's just a little confusing, aspa11y.default.browser
is defined asnull
.When setting my own
pa11y.defaults.page
, I expected to be able to setpa11y.defaults.ignoreUrl
and not have to provide theurl
parameter oroptions.url
.Additionally, if
pa11y.defaults.url
is set, then there is no need for any parameters to be passed topa11y()
.Actual behaviour
pa11y()
expects a url, either as a param or via options. The code that handles this does not consider ifignoreUrl
is in use. https://github.com/pa11y/pa11y/blob/master/lib/pa11y.js#L71This results in me having to do the following if I pass in my own page object.
The empty string passed in
await pa11y('');
seems like a really minor deal, but the setup and configuration of pa11y is separate from its usage in my code. I'm afraid it results in being confusing for others who might not understand why they need to usepa11y('')
instead ofpa11y()
.Steps to reproduce
Environment:
The text was updated successfully, but these errors were encountered: