axe-core-npm
axe-core-npm copied to clipboard
Playwright: How to configure options for a check?
Product: playwright
Expectation: I would like to configure options for color-contrast
check in Axe analysis with Playwright.
Actual: Can't use configure()
for AxeBuilder, and according to the documentation it isn't available in the API.
Motivation: With axe-core I have been able to configure color-contrast
options with:
axe.configure({
checks: [
{
id: 'color-contrast',
options: { ... }
}]});
Is there a way to configure check options with Playwright?
axe-core version: 4.4.1 @axe-core/playwright: 4.4.0
Advanced rule configuration is not something we're planning to support in our free packages. Such features are available in axe DevTools for Enterprise.
I am curious though what you're looking to use this for. Depending on what it is, there might be another solution, or perhaps something we can provide that doesn't involve exposing all of axe.configure open, because there be dragons.
Hi, the need for using rule configuration would be to change boldValue
of the color-contrast check (https://github.com/dequelabs/axe-core/blob/develop/lib/checks/color/color-contrast.json#L8). It's for a case where the specific font used on the page is such that it's seen as passing the accessibility criteria when boldValue
is 600.
Closing as this is an enterprise feature
Nothing to QA here.