Skip to content

Playwrights pause feature fails axetest #1188

@endlacer

Description

@endlacer

Describe the bug
When using page.pause() in Playwright tests, axe-core/playwright throws an HTML validation error for the element that is injected by Playwright's pause functionality. The error indicates that the custom element is not permitted as content under the element according to html-validate rules.

To Reproduce
Steps to reproduce the behavior:

Set up a Playwright test with axe-core/playwright integration

Add page.pause() to your test code

Run the test

See error: "HTML ERROR: element is not permitted as content under "

Expected behavior
The axe-core/playwright accessibility testing should ignore or properly handle Playwright's internal debugging elements (like ) that are injected during pause functionality, allowing tests to run without HTML validation errors.

Environment:
Browser: Chrome
Playwright version: "1.51.0"
@axe-core/playwright version: "4.10.1"
Node.js version: 20

Additional context
The error occurs because Playwright injects a custom element directly under the element when using the pause functionality. This element is used for Playwright's debugging interface but conflicts with standard HTML validation rules that axe-core/playwright enforces. The error originates from the html-validate rule "element-permitted-content" which restricts what elements can be direct children of .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions