GitPedia

Wp theme auditor

Accessibility auditing tools for WordPress themes.

From wpaccessibility·Updated June 14, 2026·View on GitHub·

You can install this package to run [Axe](https://deque.com/axe) tests against your theme for automated accessibility feedback. The project is written primarily in JavaScript, distributed under the GNU General Public License v2.0 license, first published in 2019. Key topics include: accessibility, axe, wordpress, wp-theme-auditor.

Latest release: v0.4.0
October 14, 2019View Changelog →

wp-theme-auditor

Accessibility auditing tools for WordPress themes.

You can install this package to run Axe tests against your theme for automated accessibility feedback.

Requirements

  • npm >= 6.8.0
  • A local WordPress install (>= 5.0)
  • A theme to test

Installation

Run the following command from your theme's root directory:

bash
npm init wp-theme-auditor

Then you'll need to add more test cases. You can do this interactively by running npm run create-test-cases from your theme's root directory.

If, say, you wanted to test your theme's contact page which has a slug of contact, you might create a new test case with the following inputs:

bash
$ npm run create-test-cases > twentytwenty@1.0.0 create-test-cases /Users/ned/Sites/a11y/wp-content/themes/twentytwenty > create-test-cases Creating test cases... ? What is the post type? page ? What is the slug of the post or page? contact ? What is the title of the post or page? Contact page Test case created at /Users/ned/Sites/a11y/wp-content/themes/twentytwenty/test/contact.test.js.

The resulting test case file would contain the following content:

javascript
/*global page */ const { WP_BASE_URL } = require("./support/config"); describe("Contact page", () => { beforeAll(async () => { await page.goto(`${WP_BASE_URL}/?pagename=contact`); }); it("Should pass Axe tests", async () => { await expect(page).toPassAxeTests(); }); });

Usage

bash
npm run test:axe

Tests will be run against http://one.wordpress.test by default. If you'd like to run your tests against a different WordPress install, you can use the WP_BASE_URL environment variable:

bash
WP_BASE_URL=https://custom.test npm run test:axe

Contributors

Contributors

Showing top 1 contributor by commit count.

View all contributors on GitHub →

This article is auto-generated from wpaccessibility/wp-theme-auditor via the GitHub API.Last fetched: 6/24/2026