AxeResults

Playwright\Accessibility\AxeResults

Contains the results of an axe-core accessibility analysis.

$ composer require playwright-php/accessibility

Methods

__construct()

function __construct( public array $violations = [], public array $passes = [], public array $incomplete = [], public array $inapplicable = [], public ?string $url = null, public ?string $timestamp = null, )

fromArray()

self

Create AxeResults from axe-core JSON output.

function fromArray(array $data): self

hasViolations()

bool

Check if the page has any violations.

function hasViolations(): bool

getViolationCount()

int

Get the total number of violations.

function getViolationCount(): int