PHPackages                             flowd/axeception - 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. flowd/axeception

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

flowd/axeception
================

Automated axe-core accessibility testing for Codeception with per-validation and per-selector expectations to catch regressions

1.2.0(5mo ago)115[2 PRs](https://github.com/flowdgmbh/codeception-axeception/pulls)MITPHPPHP ^8.3

Since Aug 27Pushed 5mo agoCompare

[ Source](https://github.com/flowdgmbh/codeception-axeception)[ Packagist](https://packagist.org/packages/flowd/axeception)[ Docs](https://flowd.de)[ RSS](/packages/flowd-axeception/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (11)Used By (0)

AxeCeption – axe-core accessibility testing for Codeception
===========================================================

[](#axeception--axe-core-accessibility-testing-for-codeception)

A lightweight Codeception module + reporter to run axe-core in your browser tests and generate a consolidated HTML report (Twig-based) per test suite.

- Module: runs axe-core in the current page via WebDriver, supports axe.configure and custom axe script URL.
- Reporter: aggregates results from all tests and renders tests/\_output/axeception-report.html using Twig templates.

Features
--------

[](#features)

- Execute axe.run() in real browser context (Codeception WebDriver)
- Optional axe.configure(...) via YAML config (passed verbatim to axe)
- Per-violation details (rule, impact, WCAG tags, nodes with target selectors and HTML snippets)
- One consolidated HTML report with Table of Contents (anchors per test)
- Custom output filename per test (via module config reportFilename)

Requirements
------------

[](#requirements)

- PHP 8.3+
- Codeception 5+
- Codeception WebDriver module (Chromedriver/Geckodriver etc.)

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

[](#installation)

```
composer require flowd/axeception
```

The package depends on `twig/twig:^3.10`.

Enable in your suite
--------------------

[](#enable-in-your-suite)

Enable WebDriver and AxeCeption in your suite (e.g. tests/Acceptance.suite.yml):

```
modules:
  enabled:
    - WebDriver:
    - Codeception\Module\AxeCeption:
        # Optional: filename for the HTML report (relative to _output or absolute path)
        reportFilename: 'axeception-report.html'

        # Optional: URL or local path to axe-core script
        # Defaults to https://unpkg.com/axe-core/axe.min.js
        axeJavascript: '/axe.min.js'

        # Optional: configuration passed to axe.configure({...}) before axe.run()
        axeConfigure:
          rules:
            # example: disable a rule
            - id: "aria-allowed-role"
              enabled: false
            # example: enable enhanced color contrast
            - id: "color-contrast-enhanced"
              enabled: true
```

Notes:

- The module automatically injects axe-core into the current page and runs `axe.configure(...)` if `axeConfigure` is provided.
- If `reportFilename` is set on the module, it will be used; an individual test can also override it (see below).

Using in tests (Cest)
---------------------

[](#using-in-tests-cest)

Call `seeNoAccessibilityIssues()` in your Cest scenarios after navigating to a page:

```
