Skip to content

[Feat]: Add ability to ignore known issues with assertNoAccessibilityIssues() #1636

@kylemilloy

Description

@kylemilloy

Problem

Right now we have a website that requires the page be refreshed via meta after 2hrs to force a log out. This is a client requirement. The issue is that playwright sees this as a CRITICIAL issue so there's no level we can set to ignore this.

Selector: meta[http-equiv="refresh"]
  HTML: <meta http-equiv="refresh" content="7201">
  any:
    - <meta> tag forces timed refresh of page (less than 20 hours)

https://dequeuniversity.com/rules/axe/4.10/meta-refresh?application=axeAPI

Solution

Allow a user to be able to ignore specific elements as per the docs in Playwright

visit('/')->assertNoAccessibilityIssues(2, [
  'excludes' => ['[data-test-exclude]']
])

// or

visit('/')->assertNoAccessibilityIssues(excludes: '[data-test-exclude]') // Arr::wrap() in the method.
<meta http-equiv="refresh" content="7201" data-test-exclude>

This can then be expanded to inject other configs into the accessibility.

I'm willing to open a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions