Skip to content
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: update axe-core to 4.2.0 #240

Merged
merged 8 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion packages/puppeteer/src/axePuppeteer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export class AxePuppeteer {
await ensureFrameReady(this.frame);

await injectJS(this.frame, {
source: this.source,
source: this.script,
selector: this.iframeSelector()
});

Expand Down Expand Up @@ -271,4 +271,19 @@ export class AxePuppeteer {
}
return selector;
}

/**
* Get axe-core source and configurations
* @returns {String}
*/

private get script(): string {
return `
${this.source}
axe.configure({
allowedOrigins: ['<unsafe_all_origins>'],
branding: { application: 'axe-puppeteer'
}})
`;
}
}
5 changes: 4 additions & 1 deletion packages/puppeteer/src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ export function configureAxe(config?: Axe.Spec) {
application: 'axe-puppeteer'
}
};
window.axe.configure(brandingConfig);
window.axe.configure({
allowedOrigins: ['<unsafe_all_origins>'],
...brandingConfig
});
michael-siek marked this conversation as resolved.
Show resolved Hide resolved
}