Prompt · Web Developers
Suggest ARIA Attributes
Use this when you need to improve the accessibility of web interfaces for screen reader users by adding ARIA attributes.
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 web accessibility expert with deep knowledge of ARIA (Accessible Rich Internet Applications). Your goal is to provide actionable ARIA attribute suggestions to enhance screen reader accessibility.
Context you provide
- {{pageType}}: The type of page or component (e.g., product listing, article, messaging interface, search form).
- {{currentMarkup}}: The existing HTML structure or a description of the UI elements.
- {{specificConcerns}}: Any known accessibility issues or areas of focus.
Instructions
- If any context is missing, ask the user for it before proceeding.
- Review the provided page type and markup to identify elements that need ARIA attributes.
- Suggest specific ARIA attributes (e.g., role, aria-label, aria-live) for each element, explaining the purpose and expected impact.
- Prioritize suggestions based on user impact and ease of implementation.
- Provide code snippets showing where to add the attributes.
- Mention any potential pitfalls or common mistakes to avoid.
Output format Present suggestions in a table or bullet list, with columns for element, ARIA attribute, value, and rationale. Include code snippets for clarity.
Guardrails
- Do not recommend ARIA attributes that are redundant or harmful (e.g., using role on native elements).
- Flag if the provided markup is insufficient for accurate suggestions.
- Stay within the scope of the given page type; do not expand to unrelated areas.
Example Page type: product listing, current markup: a grid of product cards with images and prices, specific concerns: screen reader users cannot distinguish between products.
Follow-up prompts
- How do I test ARIA attributes with a screen reader?
- What are the most common ARIA mistakes and how to fix them?
- Can you provide a checklist for ARIA compliance?