Accessibility Checker — Seed Issues
WP-CLI command to seed synthetic accessibility issues for local/staging testing. Requires Accessibility Checker (free) plugin.
by Equalize Digital · github.com/pattonwebz/accessibility-checker-seed-issues · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/pattonwebz/accessibility-checker-seed-issues/archive/refs/heads/master.zipA standalone WordPress plugin that adds a WP-CLI command for seeding synthetic accessibility issues into the database. Intended exclusively for local and staging environments to generate realistic test data for the Accessibility Checker plugin.
Requirements
| Requirement | Minimum version |
|---|---|
| PHP | 7.4 |
| WordPress | 6.4 |
| Accessibility Checker (free) | 1.14.0 |
| WP-CLI | any recent version |
⚠️ Do not activate this plugin on a production site. It writes synthetic data directly to your database. The plugin will emit a warning if
WP_ENVIRONMENT_TYPEis set toproduction.
Installation
- Download or clone this repository into your
wp-content/plugins/directory:wp-content/plugins/accessibility-checker-seed-issues/ - Activate the plugin via WP-Admin → Plugins, or with WP-CLI:
wp plugin activate accessibility-checker-seed-issues - Confirm the command is registered:
wp accessibility-checker issues seed --help
Usage
wp accessibility-checker issues seed [--count=<n>] [--mode=<mode>] [--post-ids=<ids>] [--rule-slugs=<slugs>]
Options
| Option | Default | Description |
|---|---|---|
--count=<n> |
100 |
Number of issue rows to create |
--mode=<mode> |
mixed |
Ignore state: mixed, open, dismissed, or global |
--post-ids=<ids> |
(all published posts) | Comma-separated list of post IDs to seed against |
--rule-slugs=<slugs> |
(all error/warning rules) | Comma-separated list of rule slugs to seed |
Modes
| Mode | Description |
|---|---|
mixed |
Cycles through open, dismissed, and globally-dismissed rows |
open |
All rows are active (not dismissed) |
dismissed |
All rows are post-level dismissed |
global |
All rows are globally dismissed |
Examples
# Seed 100 rows in mixed mode (open + dismissed + global)
wp accessibility-checker issues seed
# Seed 500 open issues
wp accessibility-checker issues seed --count=500 --mode=open
# Seed against specific posts only
wp accessibility-checker issues seed --post-ids=1,2,3
# Seed only specific rule types
wp accessibility-checker issues seed --rule-slugs=missing_alt_text,empty_link
# Combine options
wp accessibility-checker issues seed --count=250 --mode=dismissed --post-ids=10,20 --rule-slugs=missing_alt_text
# Enable WP-CLI debug output
wp accessibility-checker issues seed --debug
How it works
The command:
- Verifies all runtime dependencies (free plugin active, DB table exists, correct version)
- Loads all published posts (up to 200) — or uses the post IDs you pass
- Loads all registered error/warning rules from
edac_register_rules()— or uses the slugs you pass - Iterates up to
--counttimes, cycling posts × rules × states to generate varied rows - Inserts each row directly into the
{prefix}_accessibility_checkertable - Logs progress every 50 rows and prints a final success summary
Dependency checks
The plugin performs dependency checks at both activation time (wp-admin) and boot time (WP-CLI). If any check fails, the command is not registered and a clear error message is shown.
Checks performed:
- PHP ≥ 7.4
EDAC_VERSIONconstant defined (free plugin active)- Free plugin version ≥ 1.14.0 (required for
edac_filter_command_classesfilter) CLICommandInterfaceinterface available (confirms free plugin's CLI bootstrap ran)edac_register_rules()function available{prefix}_accessibility_checkertable exists
Cleanup
To remove all seeded rows, you can identify them by their selector column (all seeded rows use .edacp-seed-<n>-<rule> selectors) or simply truncate the table and re-scan:
# Remove all seeded rows
wp db query "DELETE FROM $(wp db prefix)accessibility_checker WHERE selector LIKE '.edacp-seed-%';"
# Or truncate everything and re-run a full scan
wp db query "TRUNCATE TABLE $(wp db prefix)accessibility_checker;"
License
GPL-2.0-or-later — see LICENSE.