Skip to content

Fix WCAG 2.1 AA issues; make existing-posts alt fill opt-in - #6

Merged
howarddc merged 1 commit into
mainfrom
fix/accessibility
Sep 27, 2026
Merged

howarddc merged 1 commit into
mainfrom
fix/accessibility

Conversation

@howarddc

Copy link
Copy Markdown
Owner

Summary

Fixes every WCAG 2.1 AA failure from the accessibility review of all EveryAlt screens (six admin tabs, Media edit screen, block editor panel), plus the recommended improvements. Also makes Existing posts alt fill off by default.

Failures fixed

Criterion Issue Fix
1.3.1, 4.1.2 Review tab textareas had no label Visually hidden labels naming the image
1.4.3 Success text 3.35:1; "Key saved" badge 4.19:1 #00701a (≈6:1)
4.1.2 Budget progress bar had no name aria-label + aria-valuetext ("$0.0004 of $0.01")
4.1.3 Results not reliably announced (Media button had no live region; queue/validation regions started display:none) wp.a11y.speak for key validation, queue batches, saves, Media button; one summary per batch
2.4.3 Focus jumped to top of page after Save/Regenerate/Validate/Generate aria-disabled instead of disabled; accessibleWhenDisabled in the block editor
2.4.2 All tabs shared one page title Per-tab titles via admin_title

Improvements

  • Tab navigation is a <nav> landmark with aria-current="page"
  • Save / Regenerate / Edit controls identify their image
  • Budget input described by its unit and help text
  • Scrollable log boxes are keyboard-focusable regions with unique names
  • New-tab links announce "(opens in a new tab)" (WordPress core's already-translated string)
  • Default alt prompt asks the model to include important visible text (logos, signs, headings)

Other

  • Existing posts fill is off by default (opt-in)
  • 6 new strings translated for all 7 locales (169/169, msgfmt --check clean)

Verification (WordPress Playground)

  • axe-core (wcag2a/2aa/21a/21aa + best-practice) on all six tabs, before and after interaction: 0 violations (previously: unlabeled textareas, contrast ×2, progressbar name)
  • Focus stays on the button after Validate key, Generate, Save, and the Media screen button
  • Announcements observed in WordPress's live regions: "API key is valid.", "1 finished. All done.", "Saved!", "Alt text generated."
  • Reflow at 320px: no horizontal scrolling on any tab
  • Provider request tests: 13/13 pass

🤖 Generated with Claude Code

…opt-in

Failures fixed (found by axe-core, contrast calculation, and focus tests):
- 1.3.1/4.1.2: label the Review tab alt text and title textareas.
- 1.4.3: success text and the "Key saved" badge now use #00701a (6:1).
- 4.1.2: name the Logs budget progress bar (aria-label + aria-valuetext).
- 4.1.3: announce results via wp.a11y.speak (key validation, queue
  batches, review saves, Media screen button); drop per-card and hidden
  live regions that announced unreliably or twice.
- 2.4.3: busy buttons use aria-disabled instead of disabled so keyboard
  focus is not lost; block editor button uses accessibleWhenDisabled.
- 2.4.2: per-tab page titles via admin_title.

Improvements:
- Tab navigation is a nav landmark with aria-current on the active tab.
- Save/Regenerate/Edit controls identify their image for screen readers.
- Budget input is described by its unit and help text.
- Scrollable log boxes are focusable regions with unique names.
- Links opening a new tab carry core's "(opens in a new tab)" text.
- Default alt prompt asks for important visible text in the image.

Also: the Existing posts alt fill is now off by default.

Translations: 6 new strings translated for all 7 locales (169/169).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@howarddc
howarddc merged commit 172a799 into main Sep 27, 2026
4 checks passed
@howarddc
howarddc deleted the fix/accessibility branch September 27, 2026 16:51
@howarddc howarddc mentioned this pull request Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant