You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This does not work at all. This tests the entire page:axe.run({include: 'main'})// Oddly enough, this only tests `header`.// Everything after the first string is ignored:axe.run({include: ['header','main']})
Neither of these options is described in our docs. That makes me thing these were never supposed to work, and we created an error in the type definition. That said, we have tons of tests that do something like {include: ['#fixture']}, presumably others building on top of axe have done similar things. I don't really know why these do work. Going from the code it looks intentional. And to allow multiple strings in that array, the only change would be to change a break in a for-loop to a continue. That seems like a bug.
The way I see it, we can either change our types to what we actually support, or update what we support to match the types. I'm leaning towards the latter. It adds a little more complexity to Context, but makes them more intuitive in my opinion. If we didn't want that complexity we probably stop supporting {include: ['#fixture']}, which I'm concerned may break other implementations.
The text was updated successfully, but these errors were encountered:
Validated with the latest code base of axe-core develop branch,
Tested on test page http://qateam.dequecloud.com/attest/api/test.html
Now if we run await axe.run({ include: ['main'] }); we can see the context object with the expected results
Our ContextObject is defined as follows:
At least two of those are impossible today:
Neither of these options is described in our docs. That makes me thing these were never supposed to work, and we created an error in the type definition. That said, we have tons of tests that do something like
{include: ['#fixture']}
, presumably others building on top of axe have done similar things. I don't really know why these do work. Going from the code it looks intentional. And to allow multiple strings in that array, the only change would be to change abreak
in a for-loop to acontinue
. That seems like a bug.The way I see it, we can either change our types to what we actually support, or update what we support to match the types. I'm leaning towards the latter. It adds a little more complexity to Context, but makes them more intuitive in my opinion. If we didn't want that complexity we probably stop supporting
{include: ['#fixture']}
, which I'm concerned may break other implementations.The text was updated successfully, but these errors were encountered: