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: add axe.frameMessenger with configurable allowedOrigins #2880

Merged
merged 23 commits into from
Apr 20, 2021

Conversation

WilcoFiers
Copy link
Contributor

Add a mechanism for axe integrations to change how axe-core communicates with frames. This allows us to avoid messages from interfering with page scripts that use window.sendMessage(). This better isolates axe-core from the page, by preventing axe from receiving messages from other scripts, and preventing those scripts from receiving messages from axe.

Recommendation: All axe-core integrations that can communicate through other means should use axe.frameMessenger to avoid issues with window.sendMessage(). See doc/frame-messenger.md for details.

Important: By default axe.frameMessenger, which uses window.sendMessage(), only communicates with frames that have the same origin. For cross-origin frame testing, configure the allowed origins through axe.configure({ allowedOrigins }). Frames that are not tested because they do not have a trusted origin are reported as incomplete in the frame-tested rule. See doc/API.md for details.

@WilcoFiers WilcoFiers requested a review from a team as a code owner April 20, 2021 10:43
@WilcoFiers WilcoFiers merged commit b27bab3 into develop Apr 20, 2021
@WilcoFiers WilcoFiers deleted the frame-messenger branch April 20, 2021 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants