Complete AI Training

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.

All 25 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 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

  1. If any context is missing, ask the user for it before proceeding.
  2. Review the provided page type and markup to identify elements that need ARIA attributes.
  3. Suggest specific ARIA attributes (e.g., role, aria-label, aria-live) for each element, explaining the purpose and expected impact.
  4. Prioritize suggestions based on user impact and ease of implementation.
  5. Provide code snippets showing where to add the attributes.
  6. 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?