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.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- 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
- If any context is missing, ask for it before starting.
- Review the provided HTML for non-semantic elements (e.g., divs used for buttons, missing landmarks).
- Suggest semantic replacements (e.g., <nav>, <main>, <button>) and explain the accessibility benefits.
- Provide best practices for structuring headings, forms, and interactive elements.
- 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?