claude-plugin-wordpress-manager 1.4.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/.claude-plugin/plugin.json +7 -3
  2. package/CHANGELOG.md +111 -0
  3. package/README.md +10 -3
  4. package/agents/wp-accessibility-auditor.md +206 -0
  5. package/agents/wp-content-strategist.md +18 -0
  6. package/agents/wp-deployment-engineer.md +34 -2
  7. package/agents/wp-performance-optimizer.md +12 -0
  8. package/agents/wp-security-auditor.md +20 -0
  9. package/agents/wp-security-hardener.md +266 -0
  10. package/agents/wp-site-manager.md +14 -0
  11. package/agents/wp-test-engineer.md +207 -0
  12. package/docs/GUIDE.md +68 -15
  13. package/docs/guides/INDEX.md +46 -0
  14. package/docs/guides/wp-blog.md +590 -0
  15. package/docs/guides/wp-design-system.md +976 -0
  16. package/docs/guides/wp-ecommerce.md +786 -0
  17. package/docs/guides/wp-landing-page.md +762 -0
  18. package/docs/guides/wp-portfolio.md +713 -0
  19. package/docs/plans/2026-02-27-design-system-guide-design.md +30 -0
  20. package/docs/plans/2026-02-27-local-dev-tools-assessment.md +332 -0
  21. package/docs/plans/2026-02-27-local-env-design.md +179 -0
  22. package/docs/plans/2026-02-27-site-type-guides-design.md +44 -0
  23. package/package.json +7 -3
  24. package/skills/wordpress-router/SKILL.md +25 -5
  25. package/skills/wordpress-router/references/decision-tree.md +59 -3
  26. package/skills/wp-accessibility/SKILL.md +170 -0
  27. package/skills/wp-accessibility/references/a11y-audit-tools.md +248 -0
  28. package/skills/wp-accessibility/references/a11y-testing.md +222 -0
  29. package/skills/wp-accessibility/references/block-a11y.md +247 -0
  30. package/skills/wp-accessibility/references/interactive-a11y.md +272 -0
  31. package/skills/wp-accessibility/references/media-a11y.md +254 -0
  32. package/skills/wp-accessibility/references/theme-a11y.md +309 -0
  33. package/skills/wp-audit/SKILL.md +4 -0
  34. package/skills/wp-block-development/SKILL.md +5 -0
  35. package/skills/wp-block-themes/SKILL.md +4 -0
  36. package/skills/wp-deploy/SKILL.md +12 -0
  37. package/skills/wp-e2e-testing/SKILL.md +186 -0
  38. package/skills/wp-e2e-testing/references/ci-integration.md +174 -0
  39. package/skills/wp-e2e-testing/references/jest-wordpress.md +114 -0
  40. package/skills/wp-e2e-testing/references/phpunit-wordpress.md +141 -0
  41. package/skills/wp-e2e-testing/references/playwright-wordpress.md +108 -0
  42. package/skills/wp-e2e-testing/references/test-data-generation.md +127 -0
  43. package/skills/wp-e2e-testing/references/visual-regression.md +107 -0
  44. package/skills/wp-e2e-testing/references/wp-env-setup.md +97 -0
  45. package/skills/wp-e2e-testing/scripts/test_inspect.mjs +375 -0
  46. package/skills/wp-headless/SKILL.md +168 -0
  47. package/skills/wp-headless/references/api-layer-choice.md +160 -0
  48. package/skills/wp-headless/references/cors-config.md +245 -0
  49. package/skills/wp-headless/references/frontend-integration.md +331 -0
  50. package/skills/wp-headless/references/headless-auth.md +286 -0
  51. package/skills/wp-headless/references/webhooks.md +277 -0
  52. package/skills/wp-headless/references/wpgraphql.md +331 -0
  53. package/skills/wp-headless/scripts/headless_inspect.mjs +321 -0
  54. package/skills/wp-i18n/SKILL.md +170 -0
  55. package/skills/wp-i18n/references/js-i18n.md +201 -0
  56. package/skills/wp-i18n/references/multilingual-setup.md +219 -0
  57. package/skills/wp-i18n/references/php-i18n.md +196 -0
  58. package/skills/wp-i18n/references/rtl-support.md +206 -0
  59. package/skills/wp-i18n/references/translation-workflow.md +178 -0
  60. package/skills/wp-i18n/references/wpcli-i18n.md +177 -0
  61. package/skills/wp-i18n/scripts/i18n_inspect.mjs +330 -0
  62. package/skills/wp-interactivity-api/SKILL.md +4 -0
  63. package/skills/wp-local-env/SKILL.md +233 -0
  64. package/skills/wp-local-env/references/localwp-adapter.md +156 -0
  65. package/skills/wp-local-env/references/mcp-adapter-setup.md +153 -0
  66. package/skills/wp-local-env/references/studio-adapter.md +127 -0
  67. package/skills/wp-local-env/references/wpenv-adapter.md +121 -0
  68. package/skills/wp-local-env/scripts/detect_local_env.mjs +404 -0
  69. package/skills/wp-playground/SKILL.md +13 -1
  70. package/skills/wp-plugin-development/SKILL.md +6 -0
  71. package/skills/wp-rest-api/SKILL.md +4 -0
  72. package/skills/wp-security/SKILL.md +179 -0
  73. package/skills/wp-security/references/api-restriction.md +147 -0
  74. package/skills/wp-security/references/authentication-hardening.md +105 -0
  75. package/skills/wp-security/references/filesystem-hardening.md +105 -0
  76. package/skills/wp-security/references/http-headers.md +105 -0
  77. package/skills/wp-security/references/incident-response.md +144 -0
  78. package/skills/wp-security/references/user-capabilities.md +115 -0
  79. package/skills/wp-security/references/wp-config-security.md +129 -0
  80. package/skills/wp-security/scripts/security_inspect.mjs +393 -0
  81. package/skills/wp-wpcli-and-ops/SKILL.md +6 -0
@@ -1,19 +1,23 @@
1
- # Router decision tree (v2unified development + operations)
1
+ # Router decision tree (v4 — development + local environment + operations)
2
2
 
3
- This routing guide covers both WordPress **development** and **operations** workflows.
3
+ This routing guide covers WordPress **development**, **local environment**, and **operations** workflows.
4
4
 
5
5
  ## Step 0: determine task category
6
6
 
7
7
  Before repo triage, classify the user’s intent:
8
8
 
9
9
  - **Development** (modifying code) → proceed to Step 1
10
+ - **Local Environment** (managing local dev sites) → skip to Step 2c
10
11
  - **Operations** (managing live sites) → skip to Step 2b
11
12
 
13
+ Keywords that indicate **local environment**:
14
+ local site, Studio, LocalWP, Local by Flywheel, wp-env, local WordPress, start site, stop site, create local site, local development, symlink plugin, local database, switch PHP version, localhost, local preview, detect environment, WASM, SQLite local
15
+
12
16
  Keywords that indicate **operations**:
13
17
  deploy, push to production, audit, security check, backup, restore, migrate, move site, create post, manage content, site status, check plugins, performance check, SEO audit
14
18
 
15
19
  Keywords that indicate **development**:
16
- create block, block.json, theme.json, register_rest_route, plugin development, hooks, PHPStan, build, test, scaffold
20
+ create block, block.json, theme.json, register_rest_route, plugin development, hooks, PHPStan, build, test, scaffold, i18n, translation, accessibility, a11y, headless, decoupled, WPGraphQL
17
21
 
18
22
  ## Step 1: classify repo kind (from triage — development only)
19
23
 
@@ -53,6 +57,14 @@ Priority: `gutenberg` > `wp-core` > `wp-site` > `wp-block-theme` > `wp-block-plu
53
57
  → `wpds` (WordPress Design System)
54
58
  - **Playground / disposable WP / blueprint / sandbox / test environment / version switching**
55
59
  → `wp-playground`
60
+ - **Test / E2E / Playwright / Jest / PHPUnit / wp-env testing / coverage / visual regression**
61
+ → `wp-e2e-testing` skill + `wp-test-engineer` agent
62
+ - **i18n / translation / .pot / gettext / text domain / RTL / Polylang / WPML / multilingual**
63
+ → `wp-i18n`
64
+ - **Accessibility / a11y / WCAG / ARIA / screen reader / keyboard navigation / focus management**
65
+ → `wp-accessibility` skill + `wp-accessibility-auditor` agent
66
+ - **Headless / decoupled / WPGraphQL / Next.js / Nuxt / Astro / Gatsby / CORS / ISR / SSG / frontend integration**
67
+ → `wp-headless`
56
68
 
57
69
  ## Step 2b: route by operational intent (keywords)
58
70
 
@@ -60,6 +72,8 @@ Priority: `gutenberg` > `wp-core` > `wp-site` > `wp-block-theme` > `wp-block-plu
60
72
  → `wp-deploy` skill + `wp-deployment-engineer` agent
61
73
  - **Audit / security check / vulnerability / hacked / health check**
62
74
  → `wp-audit` skill + `wp-security-auditor` agent
75
+ - **Harden / permissions / headers / WAF / malware / compromised / incident response / security hardening**
76
+ → `wp-security` skill + `wp-security-hardener` agent
63
77
  - **Backup / snapshot / disaster recovery / restore**
64
78
  → `wp-backup` skill
65
79
  - **Migrate / move / transfer / clone site / change hosting**
@@ -73,6 +87,40 @@ Priority: `gutenberg` > `wp-core` > `wp-site` > `wp-block-theme` > `wp-block-plu
73
87
  - **DNS / domain / SSL / hosting configuration**
74
88
  → `wp-site-manager` agent (Hostinger MCP tools)
75
89
 
90
+ ## Step 2c: route by local environment intent (keywords)
91
+
92
+ First, run detection to discover installed tools and sites:
93
+ ```bash
94
+ node skills/wp-local-env/scripts/detect_local_env.mjs
95
+ ```
96
+
97
+ Then route by intent:
98
+
99
+ - **Create / new site / setup local / install WordPress locally**
100
+ → `wp-local-env` skill (Section 1: Site lifecycle → Create)
101
+ - **Start site / stop site / delete site / site status**
102
+ → `wp-local-env` skill (Section 1: Site lifecycle)
103
+ - **WP-CLI / plugin list / scaffold / export / local command**
104
+ → `wp-local-env` skill (Section 2: WP-CLI operations)
105
+ - **Symlink / link plugin / develop locally / local dev workflow**
106
+ → `wp-local-env` skill (Section 3: Development workflow)
107
+ - **Local REST API / localhost API / application password local**
108
+ → `wp-local-env` skill (Section 4: REST API access)
109
+ - **Local database / SQLite / export DB / backup local / mysql local**
110
+ → `wp-local-env` skill (Section 5: Database operations)
111
+ - **Switch PHP / switch WordPress version / test version / local testing**
112
+ → `wp-local-env` skill (Section 6: Testing and version switching)
113
+ - **Preview / share local / ngrok / tunnel / demo site**
114
+ → `wp-local-env` skill (Section 7: Preview and share)
115
+ - **MCP adapter / local MCP / WordPress MCP server**
116
+ → `wp-local-env` skill (Section 8: MCP integration) + `references/mcp-adapter-setup.md`
117
+ - **Which tool / Studio vs LocalWP / which local env / recommend tool**
118
+ → `wp-local-env` skill (run detection, present comparison)
119
+
120
+ **Overlap with Development**: If the user is developing a plugin/theme AND needs a local site to test it, route to `wp-local-env` first (symlink workflow), then to development skills for the code changes.
121
+
122
+ **Overlap with Operations**: If the user mentions "deploy from local" or "push local to production", route to `wp-local-env` for export, then to `wp-deploy` for the deployment.
123
+
76
124
  ## Step 3: guardrails checklist (always)
77
125
 
78
126
  ### Development guardrails
@@ -80,6 +128,14 @@ Priority: `gutenberg` > `wp-core` > `wp-site` > `wp-block-theme` > `wp-block-plu
80
128
  - Prefer existing lint/test scripts if present.
81
129
  - If version constraints aren’t detectable, ask for target WP core and PHP versions.
82
130
 
131
+ ### Local environment guardrails
132
+ - Run `detect_local_env.mjs` before assuming which tool is available.
133
+ - For LocalWP: verify the site is started (GUI) before WP-CLI or DB operations.
134
+ - For Studio: verify the Studio app is running before CLI operations.
135
+ - For wp-env: verify Docker is running (`docker info`) before starting.
136
+ - Never delete a local site without explicit user confirmation.
137
+ - When multiple tools are detected, use the `recommended` field from detection output.
138
+
83
139
  ### Operations guardrails
84
140
  - Confirm target site before any operation.
85
141
  - Verify backups exist before destructive operations (deploy, migrate, restore).
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: wp-accessibility
3
+ description: "Use when improving WordPress accessibility: block accessibility (ARIA, keyboard navigation), theme accessibility (landmarks, skip links, color contrast), interactive component accessibility, media accessibility (alt text, captions, transcripts), and automated/manual a11y testing with WCAG 2.2 compliance."
4
+ compatibility: "Targets WordPress 6.9+ (PHP 7.2.24+). Filesystem-based agent with bash + node."
5
+ version: 1.0.0
6
+ source: "vinmor/wordpress-manager"
7
+ ---
8
+
9
+ # WP Accessibility
10
+
11
+ ## When to use
12
+
13
+ Use this skill for accessibility work such as:
14
+
15
+ - Making custom blocks accessible (ARIA roles, keyboard navigation, screen reader support)
16
+ - Ensuring a theme meets WCAG 2.2 AA requirements
17
+ - Fixing accessibility audit findings (axe-core violations, Lighthouse issues)
18
+ - Adding keyboard navigation to interactive components (modals, tabs, dropdowns, accordions)
19
+ - Implementing ARIA patterns from the APG (ARIA Authoring Practices Guide)
20
+ - Making media accessible (alt text, captions, transcripts, audio descriptions)
21
+ - Preparing a theme for WordPress.org `accessibility-ready` tag
22
+ - Setting up automated a11y testing in CI pipelines
23
+
24
+ ## Inputs required
25
+
26
+ - Repo root and target (plugin, theme, or block).
27
+ - Project kind: plugin, theme, block, or full site.
28
+ - Target WCAG level: AA (default) or AAA.
29
+ - Specific a11y issues reported (audit results, user feedback, review team comments).
30
+
31
+ ## Procedure
32
+
33
+ ### 0) Understand WordPress a11y standards
34
+
35
+ WordPress core has a dedicated Accessibility Team. Key principles:
36
+
37
+ 1. **WordPress.org theme review** requires `accessibility-ready` themes to pass tests covering skip links, keyboard navigation, contrast, heading hierarchy, landmarks, and form labels.
38
+ 2. **Block editor** blocks must meet core a11y standards: `useBlockProps()` provides baseline ARIA attributes; interactive blocks must handle keyboard events.
39
+ 3. **WCAG 2.2** is the target standard. WordPress aims for Level AA at minimum.
40
+
41
+ For automated a11y testing setup, reference the `wp-e2e-testing` skill.
42
+
43
+ Run project triage:
44
+ ```bash
45
+ node skills/wp-project-triage/scripts/detect_wp_project.mjs
46
+ ```
47
+
48
+ ### 1) Block accessibility
49
+
50
+ Ensure custom blocks are accessible to keyboard and screen reader users.
51
+
52
+ Key areas:
53
+ - ARIA roles and properties for custom block markup
54
+ - Keyboard interaction patterns for block controls
55
+ - Focus management when blocks are inserted, removed, or transformed
56
+ - Screen reader announcements via `wp.a11y.speak()`
57
+ - Block supports: `anchor`, `ariaLabel`
58
+
59
+ Read: `references/block-a11y.md`
60
+
61
+ ### 2) Theme accessibility
62
+
63
+ Ensure the theme meets WCAG 2.2 and `accessibility-ready` requirements.
64
+
65
+ Key areas:
66
+ - Landmark roles: `<header>`, `<nav>`, `<main>`, `<footer>`, `<aside>`
67
+ - Skip links to main content
68
+ - Heading hierarchy (single H1, logical nesting)
69
+ - Color contrast (4.5:1 normal text, 3:1 large text at AA)
70
+ - Visible focus indicators (`:focus-visible`)
71
+ - `prefers-reduced-motion` and `prefers-contrast` media queries
72
+ - `theme.json` color palette contrast compliance
73
+
74
+ Read: `references/theme-a11y.md`
75
+
76
+ ### 3) Interactive component accessibility
77
+
78
+ Implement ARIA design patterns from the APG for interactive UI components.
79
+
80
+ Key areas:
81
+ - Modal/dialog: focus trap, Escape to close, return focus to trigger
82
+ - Dropdown/menu: arrow key navigation, typeahead
83
+ - Tabs: arrow keys to switch, Home/End support
84
+ - Accordion: `aria-expanded`, Enter/Space to toggle
85
+ - Carousel: pause on hover/focus, slide announcements
86
+ - Live regions for dynamic content updates
87
+ - WordPress Interactivity API + a11y: pair `data-wp-on--click` with `data-wp-on--keydown`
88
+
89
+ Read: `references/interactive-a11y.md`
90
+
91
+ ### 4) Media accessibility
92
+
93
+ Ensure all media content has appropriate text alternatives.
94
+
95
+ Key areas:
96
+ - Alt text for images (meaningful vs decorative `alt=""`)
97
+ - Video captions (`<track kind="captions">`) and audio descriptions
98
+ - Audio transcripts as text alternatives
99
+ - SVG accessibility: `role="img"` + `aria-label` or `<title>`
100
+ - WordPress media library alt text handling
101
+
102
+ Read: `references/media-a11y.md`
103
+
104
+ ### 5) Automated a11y testing
105
+
106
+ Set up automated accessibility testing to catch regressions early.
107
+
108
+ Key areas:
109
+ - axe-core integration with Playwright (`@axe-core/playwright`)
110
+ - pa11y for quick page-level checks
111
+ - Lighthouse accessibility audits
112
+ - CI pipeline integration
113
+ - Interpreting and prioritizing violations
114
+
115
+ Read: `references/a11y-audit-tools.md`
116
+
117
+ ### 6) Manual a11y testing
118
+
119
+ Automated tools catch only ~30-40% of a11y issues. Manual testing is essential.
120
+
121
+ Key areas:
122
+ - Keyboard-only navigation testing
123
+ - Screen reader testing (NVDA, VoiceOver, TalkBack)
124
+ - Zoom testing (200% and 400%)
125
+ - Color contrast verification
126
+ - Reduced motion preference testing
127
+ - Systematic per-page testing checklist
128
+
129
+ Read: `references/a11y-testing.md`
130
+
131
+ ## Verification
132
+
133
+ - **axe-core** returns 0 violations at the target WCAG level
134
+ - **Keyboard** works for all interactive elements: focusable, operable, visible focus
135
+ - **Screen reader** announces correctly: landmarks, headings, form labels, updates
136
+ - **Color contrast** passes: 4.5:1 normal text, 3:1 large text (AA)
137
+ - **Heading hierarchy** is logical: single H1, no skipped levels
138
+ - **Skip link** is present and functional
139
+ - **Zoom to 400%** causes no content loss or horizontal scroll
140
+ - **Reduced motion** is respected: animations disabled when preference set
141
+
142
+ ```bash
143
+ npx pa11y http://localhost:8888
144
+ npx lighthouse http://localhost:8888 --only-categories=accessibility --output=json
145
+ ```
146
+
147
+ ## Failure modes / debugging
148
+
149
+ | Symptom | Cause | Fix |
150
+ |---------|-------|-----|
151
+ | "Insufficient color contrast" | Ratio below 4.5:1 | Adjust in `theme.json` or CSS |
152
+ | "Images must have alt text" | Missing `alt` | Add via media library or `wp_get_attachment_image()` |
153
+ | "No main landmark" | Missing `<main>` | Add `<main id="main-content">` |
154
+ | "No level-one heading" | Missing/multiple H1 | Single `<h1>` per page |
155
+ | Can't reach element via keyboard | Non-interactive element | Use `<button>` or `<a>` instead of `<div>` |
156
+ | Focus trapped | Bad focus trap | Only trap in modals; release on close |
157
+ | No announcement on update | Missing live region | `aria-live="polite"` or `wp.a11y.speak()` |
158
+ | Wrong reading order | DOM/visual mismatch | Align DOM with visual order |
159
+ | Focus not visible | Outline removed | Use `:focus-visible` with visible style |
160
+
161
+ ## Escalation
162
+
163
+ - WordPress Accessibility Handbook: https://make.wordpress.org/accessibility/handbook/
164
+ - WCAG 2.2: https://www.w3.org/TR/WCAG22/
165
+ - ARIA Authoring Practices Guide: https://www.w3.org/WAI/ARIA/apg/
166
+ - WordPress Accessibility Coding Standards: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/accessibility/
167
+
168
+ ## Recommended Agent
169
+
170
+ For automated accessibility scanning and WCAG compliance reports, use the **`wp-accessibility-auditor`** agent.
@@ -0,0 +1,248 @@
1
+ # Accessibility Audit Tools
2
+
3
+ Use this file when selecting and configuring tools for accessibility testing.
4
+
5
+ ## Automated testing tools
6
+
7
+ ### axe-core (Deque)
8
+
9
+ Industry standard engine. Used by Google Lighthouse, Microsoft Accessibility Insights.
10
+
11
+ ```bash
12
+ # CLI testing
13
+ npx @axe-core/cli https://localhost:8888/
14
+
15
+ # With specific tags
16
+ npx @axe-core/cli https://localhost:8888/ --tags wcag2a,wcag2aa
17
+
18
+ # Save results
19
+ npx @axe-core/cli https://localhost:8888/ --save results.json
20
+ ```
21
+
22
+ Browser extensions:
23
+ - **axe DevTools** (Chrome/Firefox) — free version covers most WCAG checks
24
+ - **Accessibility Insights** (Microsoft, Chrome) — guided assessments
25
+
26
+ ### Playwright integration
27
+
28
+ ```js
29
+ import { test, expect } from '@playwright/test';
30
+ import AxeBuilder from '@axe-core/playwright';
31
+
32
+ test('homepage has no a11y violations', async ({ page }) => {
33
+ await page.goto('/');
34
+
35
+ const results = await new AxeBuilder({ page })
36
+ .withTags(['wcag2a', 'wcag2aa'])
37
+ .exclude('.third-party-widget') // exclude elements you don't control
38
+ .analyze();
39
+
40
+ expect(results.violations).toEqual([]);
41
+ });
42
+
43
+ test('editor page is accessible', async ({ page }) => {
44
+ await page.goto('/wp-admin/post-new.php');
45
+
46
+ const results = await new AxeBuilder({ page })
47
+ .include('.editor-styles-wrapper') // focus on specific area
48
+ .withTags(['wcag2a', 'wcag2aa'])
49
+ .analyze();
50
+
51
+ expect(results.violations).toEqual([]);
52
+ });
53
+ ```
54
+
55
+ ### pa11y
56
+
57
+ ```bash
58
+ # Single page
59
+ npx pa11y https://localhost:8888/
60
+
61
+ # With specific standard
62
+ npx pa11y --standard WCAG2AA https://localhost:8888/
63
+
64
+ # Multiple pages
65
+ npx pa11y-ci --config .pa11yci.json
66
+ ```
67
+
68
+ `.pa11yci.json`:
69
+ ```json
70
+ {
71
+ "defaults": {
72
+ "standard": "WCAG2AA",
73
+ "timeout": 30000,
74
+ "wait": 1000
75
+ },
76
+ "urls": [
77
+ "http://localhost:8888/",
78
+ "http://localhost:8888/sample-page/",
79
+ "http://localhost:8888/blog/",
80
+ "http://localhost:8888/contact/"
81
+ ]
82
+ }
83
+ ```
84
+
85
+ ### Lighthouse
86
+
87
+ ```bash
88
+ # Accessibility audit via CLI
89
+ npx lighthouse https://localhost:8888/ --only-categories=accessibility --output=json --output-path=a11y-report.json
90
+
91
+ # Chrome DevTools: Lighthouse tab → Accessibility checkbox → Generate report
92
+ ```
93
+
94
+ ## WordPress-specific tools
95
+
96
+ ### WordPress Accessibility Checker plugin
97
+
98
+ Dashboard widget showing issues per page/post.
99
+
100
+ ### FLAVOR (by WordPress a11y team)
101
+
102
+ Browser extension specifically for WordPress theme review. Tests `accessibility-ready` requirements.
103
+
104
+ ### WP-CLI health check
105
+
106
+ ```bash
107
+ # Check theme support for accessibility features
108
+ wp theme mod list
109
+ wp eval "var_dump(current_theme_supports('html5'));"
110
+ ```
111
+
112
+ ## Color contrast tools
113
+
114
+ ### WebAIM Contrast Checker
115
+
116
+ https://webaim.org/resources/contrastchecker/
117
+
118
+ | Ratio | WCAG Level | Applies to |
119
+ |-------|-----------|-----------|
120
+ | 4.5:1 | AA | Normal text (< 24px / 18.66px bold) |
121
+ | 3:1 | AA | Large text (≥ 24px / 18.66px bold) |
122
+ | 7:1 | AAA | Normal text |
123
+ | 4.5:1 | AAA | Large text |
124
+ | 3:1 | AA | UI components and graphical objects |
125
+
126
+ ### Programmatic contrast checking
127
+
128
+ ```js
129
+ // Calculate relative luminance
130
+ function luminance(r, g, b) {
131
+ const [rs, gs, bs] = [r, g, b].map((c) => {
132
+ c = c / 255;
133
+ return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
134
+ });
135
+ return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
136
+ }
137
+
138
+ function contrastRatio(rgb1, rgb2) {
139
+ const l1 = luminance(...rgb1);
140
+ const l2 = luminance(...rgb2);
141
+ const lighter = Math.max(l1, l2);
142
+ const darker = Math.min(l1, l2);
143
+ return (lighter + 0.05) / (darker + 0.05);
144
+ }
145
+ ```
146
+
147
+ ### Browser DevTools
148
+
149
+ Chrome DevTools: Inspect element → Color picker → Shows contrast ratio and WCAG compliance.
150
+
151
+ Firefox: Accessibility tab in DevTools → Check for Issues → Contrast.
152
+
153
+ ## Screen readers
154
+
155
+ ### Testing matrix
156
+
157
+ | OS | Screen Reader | Browser |
158
+ |----|--------------|---------|
159
+ | Windows | NVDA (free) | Firefox or Chrome |
160
+ | Windows | JAWS | Chrome or Edge |
161
+ | macOS | VoiceOver (built-in) | Safari |
162
+ | iOS | VoiceOver (built-in) | Safari |
163
+ | Android | TalkBack (built-in) | Chrome |
164
+
165
+ ### NVDA quick reference
166
+
167
+ | Key | Action |
168
+ |-----|--------|
169
+ | Insert+Space | Toggle focus/browse mode |
170
+ | H | Next heading |
171
+ | Shift+H | Previous heading |
172
+ | D | Next landmark |
173
+ | Tab | Next focusable element |
174
+ | Insert+F7 | Elements list (links, headings, landmarks) |
175
+
176
+ ### VoiceOver quick reference (macOS)
177
+
178
+ | Key | Action |
179
+ |-----|--------|
180
+ | Cmd+F5 | Toggle VoiceOver |
181
+ | VO+Right | Next element |
182
+ | VO+Left | Previous element |
183
+ | VO+U | Rotor (navigate by headings, links, etc.) |
184
+ | Tab | Next focusable element |
185
+
186
+ (VO = Control+Option)
187
+
188
+ ## CI/CD integration
189
+
190
+ ### GitHub Actions
191
+
192
+ ```yaml
193
+ name: Accessibility Tests
194
+ on: [push, pull_request]
195
+
196
+ jobs:
197
+ a11y:
198
+ runs-on: ubuntu-latest
199
+ steps:
200
+ - uses: actions/checkout@v4
201
+
202
+ - name: Start WordPress
203
+ run: npx wp-env start
204
+
205
+ - name: Run axe tests
206
+ run: npx @axe-core/cli http://localhost:8888/ --tags wcag2a,wcag2aa --exit
207
+
208
+ - name: Run pa11y
209
+ run: npx pa11y-ci --config .pa11yci.json
210
+ ```
211
+
212
+ ## Audit report template
213
+
214
+ ```markdown
215
+ ## Accessibility Audit Report
216
+
217
+ **Date:** YYYY-MM-DD
218
+ **Standard:** WCAG 2.2 Level AA
219
+ **Tool:** axe-core 4.x + manual testing
220
+
221
+ ### Summary
222
+ - Critical: X issues
223
+ - Serious: X issues
224
+ - Moderate: X issues
225
+ - Minor: X issues
226
+
227
+ ### Critical Issues
228
+ 1. **[Rule ID]** — Description
229
+ - Location: page/element
230
+ - Impact: who is affected
231
+ - Fix: recommended remediation
232
+
233
+ ### Manual Testing Results
234
+ - [ ] Keyboard navigation: Pass/Fail
235
+ - [ ] Screen reader: Pass/Fail
236
+ - [ ] Color contrast: Pass/Fail
237
+ - [ ] Zoom 200%: Pass/Fail
238
+ - [ ] Reduced motion: Pass/Fail
239
+ ```
240
+
241
+ ## Verification
242
+
243
+ Automated tools catch ~30-40% of accessibility issues. Always supplement with:
244
+ 1. Keyboard-only navigation test
245
+ 2. Screen reader walk-through
246
+ 3. Color contrast verification
247
+ 4. Content zoom to 200%
248
+ 5. Reduced motion preference test