PHPackages                             playwright-php/accessibility - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. playwright-php/accessibility

ActiveLibrary[Testing &amp; Quality](/categories/testing)

playwright-php/accessibility
============================

Accessibility testing for Playwright PHP using axe-core. Check web pages for WCAG compliance.

v1.0.0(6mo ago)06MITPHPPHP ^8.2CI passing

Since Nov 8Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/playwright-php/accessibility)[ Packagist](https://packagist.org/packages/playwright-php/accessibility)[ Docs](https://playwright-php.dev)[ GitHub Sponsors](https://github.com/smnandre)[ RSS](/packages/playwright-php-accessibility/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

 [![Playwright PHP](https://github.com/playwright-php/.github/raw/main/profile/playwright-php.png)](https://github.com/playwright-php/.github/raw/main/profile/playwright-php.png) [![PHP Version](https://camo.githubusercontent.com/285cecd2bde9057681273322b20d539e1b9e022611dfd48d19555182b6833995/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322d3035393731423f6c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646)](https://camo.githubusercontent.com/285cecd2bde9057681273322b20d539e1b9e022611dfd48d19555182b6833995/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322d3035393731423f6c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646) [![CI](https://camo.githubusercontent.com/fcead8c891743a7fdd45dea485f9b675f1b2ce82395e0dc5c3402372bc17d2a9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706c61797772696768742d7068702f6163636573736962696c6974792f43492e796d6c3f6272616e63683d6d61696e266c6162656c3d546573747326636f6c6f723d314438443233266c6162656c436f6c6f723d303931363145266c6f676f436f6c6f723d464646464646)](https://camo.githubusercontent.com/fcead8c891743a7fdd45dea485f9b675f1b2ce82395e0dc5c3402372bc17d2a9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706c61797772696768742d7068702f6163636573736962696c6974792f43492e796d6c3f6272616e63683d6d61696e266c6162656c3d546573747326636f6c6f723d314438443233266c6162656c436f6c6f723d303931363145266c6f676f436f6c6f723d464646464646) [![Release](https://camo.githubusercontent.com/0f456dcf07ef7bc1b732fa41cb898f8f3e5fb82c3fefcc50dddbf534045b964b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f706c61797772696768742d7068702f6163636573736962696c6974793f6c6162656c3d537461626c65266c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646)](https://camo.githubusercontent.com/0f456dcf07ef7bc1b732fa41cb898f8f3e5fb82c3fefcc50dddbf534045b964b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f706c61797772696768742d7068702f6163636573736962696c6974793f6c6162656c3d537461626c65266c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646) [![License](https://camo.githubusercontent.com/1ed2331567307578421805c65a8cd4e59363757d6111c4969731039cf3bcc9cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706c61797772696768742d7068702f6163636573736962696c6974793f6c6162656c3d4c6963656e7365266c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646)](https://camo.githubusercontent.com/1ed2331567307578421805c65a8cd4e59363757d6111c4969731039cf3bcc9cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706c61797772696768742d7068702f6163636573736962696c6974793f6c6162656c3d4c6963656e7365266c6162656c436f6c6f723d30393136314526636f6c6f723d314438443233266c6f676f436f6c6f723d464646464646)

Playwright PHP - Accessibility
==============================

[](#playwright-php---accessibility)

Perform real **accessibility audits** on web pages using [Playwright PHP](https://github.com/playwright-php/playwright) and [axe-core](https://github.com/dequelabs/axe-core),
checking for **WCAG**, **ARIA**, color contrast, and best-practice compliance.

Installation
------------

[](#installation)

This package relies on **Playwright PHP** - to install it, follow the instructions in [Playwright PHP’s installation guide](https://github.com/playwright-php/playwright#installation).

```
composer require --dev playwright-php/accessibility
```

Usage
-----

[](#usage)

### Basic Analysis

[](#basic-analysis)

```
use Playwright\Accessibility\AxeBuilder;

$builder = new AxeBuilder($page);
$results = $builder->analyze();

if ($results->hasViolations()) {
    foreach ($results->violations as $violation) {
        echo "{$violation->id}: {$violation->help}\n";
    }
}
```

### PHPUnit Integration

[](#phpunit-integration)

```
use Playwright\Accessibility\AssertsAccessibility;

class MyTest extends TestCase
{
    use AssertsAccessibility;

    public function testPageIsAccessible(): void
    {
        $page->goto('https://example.com');
        $this->assertIsAccessible($page);
    }
}
```

### Advanced Configuration

[](#advanced-configuration)

```
// Scope to specific regions
$builder->within('#main-content')->analyze();

// Filter by WCAG level
$builder->withTags([WcagTag::WCAG_2_1_AA])->analyze();

// Disable specific rules
$builder->withoutRules([RuleId::COLOR_CONTRAST])->analyze();

// Exclude elements
$builder->exclude('.advertisement')->analyze();
```

License
-------

[](#license)

This package is released by the [Playwright PHP](https://playwright-php.dev) project under the **MIT License**. See the [LICENSE](LICENSE) file for details.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance75

Regular maintenance activity

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

191d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8951d49b371d210280a58ce48969a07d1f49924810f8a1fab3a9343eb46fdc9?d=identicon)[simonandre](/maintainers/simonandre)

---

Top Contributors

[![smnandre](https://avatars.githubusercontent.com/u/1359581?v=4)](https://github.com/smnandre "smnandre (8 commits)")

---

Tags

a11yaccessibilityariaautomationaxe-corecicolor-contrastphp-a11yphp-accessbilityphp-toolplaywrightplaywright-phpwcagtestingbrowser-testingaccessibilitywcagplaywrightaxeaxe-corea11ya11y-phpcontrast-checker

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/playwright-php-accessibility/health.svg)

```
[![Health](https://phpackages.com/badges/playwright-php-accessibility/health.svg)](https://phpackages.com/packages/playwright-php-accessibility)
```

###  Alternatives

[playwright-php/playwright

Modern PHP library for Playwright automation: browsing, scraping, screenshots, testing, and more.

7613.0k5](/packages/playwright-php-playwright)[hyvor/laravel-playwright

Laravel and Playwright E2E Testing

3312.0k](/packages/hyvor-laravel-playwright)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
