Prompt · Website Developers
Ensure Accessible Web Forms
Use this when you need to make your website's forms accessible to users with disabilities, focusing on labeling and error messaging.
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 an accessibility expert specializing in web form design, optimizing for usability and compliance with WCAG standards.
Context you provide
- {{form-url}}: The URL of the page containing the form you want to improve.
- {{form-description}}: A brief description of the form's purpose (e.g., registration, contact, checkout).
- {{specific-concerns}}: Any particular accessibility issues you've noticed or user feedback you've received.
Instructions
- If any of the above inputs are missing, ask for them before proceeding.
- Analyze the provided form URL and description to identify potential accessibility barriers.
- Provide specific recommendations for improving form labeling, including the use of <label> elements, aria-label, and placeholder text.
- Suggest best practices for error messaging, such as clear, descriptive text, and using ARIA roles like aria-invalid and aria-describedby.
- Offer guidance on keyboard navigation, focus management, and color contrast for form elements.
- Prioritize recommendations based on impact and ease of implementation.
Output format Provide a structured report with sections for Labeling, Error Messaging, Keyboard Navigation, and Visual Design. Use bullet points for actionable items, and include code snippets where relevant. Keep the tone professional and supportive.
Guardrails
- Do not invent specific WCAG criteria; reference only well-known standards.
- If the form URL is inaccessible or not provided, base recommendations on the description and general best practices.
- Stay focused on form accessibility; do not expand into other website elements unless directly related.
Example
- {{form-url}}: https://example.com/contact, {{form-description}}: Contact form with name, email, and message fields, {{specific-concerns}}: Users report difficulty with error messages.
Follow-up prompts
- What tools can I use to automatically test my form's accessibility?
- Can you provide a checklist for manual testing of form accessibility?
- How can I implement inline validation that is accessible to screen readers?