dequelabs / dequelabs/axe-core
Testing iframes with Playwright/axe-core
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 17
Description
### Product
axe-core
### Product Version
_No response_
### Latest Version
- [X] I have tested the issue with the latest version of the product
### Issue Description
#### Expectation
I am working on accessibility testing with Playwright and @axe-core, following the instructions [here](https://playwright.dev/docs/accessibility-testing). My page contains iframes and I would like to scan and analyze the content inside them.
#### Actual
When scanning the page object as per the instructions, the `incomplete` property of the `accessibilityScanResults` object contains this:
```
{
id: 'frame-tested',
impact: 'critical',
tags: [Array],
description: 'Ensures and <frame> elements contain the axe-core script',
help: 'Frames should be tested with axe-core',
helpUrl: 'https://dequeuniversity.com/rules/axe/4.9/frame-tested?application=playwright',
nodes: [Array]
}
```
The link provided under the helpUrl property says to "Ensure iframe and frame elements contain the axe-core script" but doesn't provide an example of how to achieve that.
#### How to Reproduce
When testing a page containing an iframe with code provided in the documentation:
`const accessibilityScanResults = await new AxeBuilder({ page }).analyze()`
the above issue occurs. it does not occur on pages without iframes. It happens even when trying to explicitly include the iframe as per the documentation:
`const accessibilityScanResults = await new AxeBuilder({ page }).include('#sbox-iframe').analyze()`
#### Additional context
Any thing else we should know about the issue?
Contributor guide
Assessment
This issue has not been assessed yet.