Skip to main content

Claude Prompt to Automate Accessibility Testing in CI

Build automated accessibility testing into CI with axe-core scans, keyboard navigation tests, ARIA checks, and screen reader validation.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt
Set up automated accessibility testing for a React application targeting WCAG 2.1 AA. Include: 1) axe-core integration with Playwright for every page/component, 2) Keyboard navigation tests — Tab order, focus management, skip links, 3) Color contrast validation across 2 themes (light/dark), 4) ARIA attribute validation for custom components: dropdown menu, modal dialog, accordion, data table, 5) Screen reader announcement testing with guidepup (programmatic VoiceOver/NVDA), 6) Automated alt text presence and quality checks for images, 7) Form accessibility — labels, error messages, required field announcements, 8) CI integration — fail build on serious or higher violations, 9) Accessibility report generation with remediation guidance, 10) Manual testing checklist for things automation cannot catch. Include example tests for checkout form with address autocomplete.

What this prompt does

This prompt sets up automated accessibility testing for a [framework] application targeting WCAG [wcag_level]. It integrates axe-core with your [test_runner] for every page and component, adds keyboard-navigation tests for tab order and focus management, validates color contrast across [theme_count] themes, and checks ARIA attributes on your [custom_components]. The aim is to make accessibility a gate on every PR rather than an afterthought.

It works because accessibility regressions are easy to introduce and hard to spot by eye, so automation catches what humans miss. It adds screen-reader announcement testing with [screen_reader_tool], alt-text presence and quality checks, and form accessibility validation for labels and error messages, then fails the build on [severity] or higher violations in CI. Because tooling can't catch everything, it also produces a manual testing checklist for the judgment-based issues, with worked examples for [example_page] so the setup is concrete rather than theoretical.

When to use it

  • Accessibility is a real requirement and you want it enforced on every PR
  • You need axe-core scans wired into CI for a [framework] app
  • Custom components like [custom_components] need ARIA and keyboard testing
  • You support multiple themes and must check contrast across [theme_count] of them
  • You want the build to fail on [severity]-or-higher violations
  • You need a manual checklist for the accessibility issues automation can't detect

Example output

You get a testing setup: axe-core wired into [test_runner] for pages and components, keyboard-navigation tests for tab order, focus and skip links, contrast validation across [theme_count] themes, ARIA checks for [custom_components], screen-reader announcement tests via [screen_reader_tool], alt-text presence and quality checks, form-accessibility tests for labels and errors, a CI gate failing on [severity]+ violations, a report with remediation guidance, a manual checklist, and example tests for [example_page].

Pro tips

  • Set [wcag_level] to your real compliance target (2.1 AA is common) since it determines which rules axe-core enforces
  • List your actual [custom_components] because custom widgets are where ARIA regressions hide, not standard HTML elements
  • Pick a [severity] threshold you'll hold the line on; failing the build on serious-and-above keeps the gate meaningful without blocking on minor nits
  • Treat automated checks as a floor — axe-core catches a subset of issues, so the manual checklist for things like logical reading order still matters
  • Test contrast across all [theme_count] themes; a palette that passes in light mode can quietly fail in dark mode
  • Validate screen-reader announcements with [screen_reader_tool], since correct ARIA attributes can still produce confusing spoken output
  • Check that every form field has a programmatic label and that error messages are announced, since broken forms block users more than any other accessibility gap
  • Use a realistic [example_page] like a checkout form so the example tests transfer to your hardest real screens

Frequently Asked Questions

Does automated testing catch every accessibility issue?
No, axe-core and similar tools catch a meaningful subset, but not everything. Issues like logical reading order, meaningful focus order, and whether announcements actually make sense need human judgment, which is why the prompt also produces a manual testing checklist.
Can it test custom components, not just standard HTML?
Yes, it validates ARIA attributes and keyboard behaviour for the `[custom_components]` you list, such as dropdowns, modals, accordions, and data tables. Custom widgets are exactly where accessibility regressions tend to appear, so naming them focuses the tests where they matter.
Will it fail my CI build on violations?
Yes, it fails the build on violations at `[severity]` or higher, for example serious and critical. Setting a sensible threshold keeps the gate enforceable so genuinely broken accessibility blocks the merge without minor warnings creating constant noise.
Does it check accessibility in both light and dark themes?
Yes, it validates color contrast across the `[theme_count]` themes you support. This matters because a color combination that meets contrast requirements in light mode can easily fail in dark mode, so each theme needs its own check.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in Testing & QA Automation Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

AI assistant · trained on my work

👋

Hey there!

Quick Actions

WhatsApp Direct line to me

Chat on WhatsApp

+880 1723 741224 · Replies within the hour on working days

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

mejba.13@gmail.com

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support