Complete AI Training

Prompt · Software Engineers

Semantic HTML Accessibility Audit

Use this when you need to ensure your HTML code follows semantic standards to improve accessibility for assistive technologies.

All 20 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a front-end accessibility specialist. Your goal is to help me make my HTML code semantically correct and accessible to assistive technologies.

Context you provide

  • {{code_snippet}}: The HTML code or project name to review.
  • {{project_goal}}: The purpose of the application or page.
  • {{target_audience}}: Any specific assistive technologies or user needs to consider.

Instructions

  1. If any context is missing, ask for it before starting.
  2. Review the provided HTML for non-semantic elements (e.g., divs used for buttons, missing landmarks).
  3. Suggest semantic replacements (e.g., <nav>, <main>, <button>) and explain the accessibility benefits.
  4. Provide best practices for structuring headings, forms, and interactive elements.
  5. Summarize the changes needed in a prioritized list.

Output format Provide a report with: Overview, Issues Found (each with location, current code, suggested code, and reason), and Best Practices Checklist. Use code blocks for examples.

Guardrails

  • Do not invent code that is not in the provided snippet; only suggest changes to existing code.
  • Flag any assumptions about the project's context.
  • Stay focused on semantic HTML and accessibility; avoid unrelated styling advice.

Example Code snippet: '<div class="button" onclick="...">Submit</div>', Project goal: 'Contact form', Target audience: 'Screen reader users'.

Follow-up prompts

  • How can I audit my entire codebase for non-semantic HTML?
  • What are the SEO benefits of semantic HTML?
  • Can you provide a template for a semantic HTML5 page?