-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(selenium): Implement axe.runPartial support #61
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, reviewed the changes! I marked all the resolved comments as resolved - there were a couple still left unresolved and two new ones that I've left based on the new content since the last review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good! It would still be nice to update the selenium package README's reference API section to include a mention of UseLegacyMode
, similar to the @axe-core/playwright package.
@@ -4,5 +4,5 @@ | |||
"version": "4.4.0", | |||
"license": "MPL-2.0 AND MIT", | |||
"repository": "dequelabs/axe-core-nuget", | |||
"private": true | |||
"private": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect JSON formatting.
"private": true, | |
"private": true |
InitDriver(browser); | ||
GoToFixture("index.html"); | ||
#pragma warning disable CS0618 | ||
new AxeBuilder(WebDriver, CustomSource($"{axeSource}{axeForceLegacy}")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use the legacy version of axe and not the one that forces it to be legacy.
7ebf80a
to
d95a303
Compare
…ode API (#68) ## Details This PR adds API documentation for the new public `UseLegacyMode` API to the README docs for the selenium package. The docs are based on the similar docs for [`@axe-core/playwright`'s `setLegacyMode` API](https://github.com/dequelabs/axe-core-npm/tree/develop/packages/playwright#axebuildersetlegacymodelegacymode-boolean--true). While I was writing the code sample for the docs, I noticed that the default value for the new API (previously `false`) made for the following confusing behavior: ```csharp // Looks intuitively like it would be using legacy mode, but actually isn't AxeResult axeResult = new AxeBuilder(webDriver) .UseLegacyMode() .Analyze(); ``` This PR updates the default value on `UseLegacyMode`'s parameter to `true` to make this interaction less confusing and for consistency with the `@axe-core/playwright` behavior. Follow-up to #61 / #15
Details
By default now uses
axe.runPartial
andaxe.finishRun
to analyze the page rather thanaxe.run
.Also adds
AxeBuilder.UseLegacyMode
to switch back to usingaxe.run
.Closes Issue: #14
Closes Issue: #15