Prompt for an accessibility pass on exported pages
This prompt asks an AI assistant to check exported HTML pages for text alternatives on images, one h1 and a sensible heading order, labels on form fields, visible focus styles and color contrast, then fix the clear cases without changing the design. It lists the judgment calls, such as alt text wording, for you.
Last reviewed
Key facts
- WCAG 2.2 criterion 1.1.1 requires a text alternative that serves the equivalent purpose.
- WCAG 2.2 criterion 2.4.7 requires a visible keyboard focus indicator at level AA.
- An assistant can fix structure reliably but should not invent meaning for images.
- Test status: partly run on a real export: the alt, lang and h1 checks. Focus and contrast checks have not been run.
The prompt
Paste this into Claude Code, Cursor, Gemini CLI or another AI coding assistant with your project folder open, and replace everything in square brackets first. See how to run it in each tool.
You are improving accessibility on static pages in [PROJECT_FOLDER] without changing how they look.
CHECK AND REPORT IN A11Y_REPORT.md
1. Images: every img has an alt attribute. Decorative images get alt="". Informative images get a short alt that says what the image shows or does. If you cannot tell what an image shows, list it for me instead of guessing.
2. Headings: one h1 per page, no skipped levels, headings describe the section.
3. Forms: every input, select and textarea has a visible label or an aria-label. Required fields are marked in the markup.
4. Links and buttons: no empty links, no "click here", buttons are button elements.
5. Focus: interactive elements show a visible focus style. Add one that matches the design if it is missing.
6. Contrast: list text and background pairs that look low in contrast, with the hex values.
7. Language and landmarks: html has a lang attribute, and the page has main, nav and footer landmarks.
RULES
- Fix structure and attributes. Do not change colors, fonts or layout.
- Put every judgment call in the report, with the file and line.
- Commit after each group of fixes.How to run it
- Run the prompt on one page type first, such as the home page, and review the diff.
- Fix the clear cases the assistant proposes, and write the alt text for images it listed.
- Check the pages with the keyboard only: tab through every page and confirm you can see where you are.
- Repeat for the other page types and run the contrast checker on the color pairs in the report.
What the assistant can and cannot decide
| Area | Safe for the assistant | Needs your decision |
|---|---|---|
| Images | Add alt="" to decoration, add alt where the surrounding text makes the meaning clear | Alt text for photos, charts and logos that carry meaning |
| Headings | Fix skipped levels and a second h1 | Whether a section should have a heading at all |
| Forms | Connect labels to inputs with for and id | Wording of error messages |
| Focus | Add a visible outline in the existing brand color | Changing the look of a styled component |
| Contrast | Report pairs and ratios | Which color to change |
Verify the result
These commands find the most common gaps. They are a first pass, and a keyboard test and a contrast check are still needed.
grep -rn "<img" ./exported-site --include="*.html" | grep -v "alt=" | head
grep -rLn "<html[^>]*lang=" ./exported-site --include="*.html" | head
grep -rc "<h1" ./exported-site --include="*.html" | grep -v ":1$" | head- The first command prints nothing, so every image has an alt attribute.
- Each page has a lang attribute and exactly one h1.
- You can reach every link, button and field with the Tab key, and the focus is visible.
What can go wrong
- The assistant writes alt text for images it cannot see. The prompt tells it to list those images instead.
- Adding aria attributes everywhere. Native elements and real labels are better than extra attributes.
- Removing the focus outline for looks. Replace it with a better one, and never remove it.
Frequently asked questions
Can AI make a site fully accessible?
No. It fixes structure and attributes well, but meaning and wording need a person, and a keyboard and screen reader test is still needed.
Which standard does the prompt follow?
It follows WCAG 2.2 success criteria such as 1.1.1 Non-text Content and 2.4.7 Focus Visible, which the W3C quick reference lists.
Do exports start with alt text?
An export keeps the alt text the original site had, including any gaps. The Image Alt Auditor lists images that lack it.
How do I check contrast?
Use the Exported Site Contrast Auditor with the hex pairs from the report.
Official documentation
Free tools for this job
- Image Alt AuditorAudit missing/empty alt attributes and image usage quality signals.
- Exported Site Contrast AuditorVerify accessibility standards and color contrast ratios for self-hosted websites.
- Meta Tags AuditorAudit title, description, H1, Open Graph, and Twitter tags across URLs.
- Indexability CheckerDecide indexability using robots.txt, meta robots, canonical, and status code.
Start with the files
Prompts work best on a WebExport download of your site. Paste your public URL into the export form and get a ZIP. The Free plan covers 1 site, 5 exports a month, 15 pages and 20 MB per export. Professional is a $9.99 one-time purchase with unlimited pages.