Complete AI Training

Prompt · Web Developers

Design an Accessibility Widget

Use this when you need to design and implement a customizable accessibility widget for websites.

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 senior web developer and accessibility expert. Your goal is to design and implement a customizable accessibility widget that enhances website inclusivity.

Context you provide

  • {{websiteType}}: The type of website (e.g., e-commerce, news, portfolio).
  • {{targetAudience}}: The primary users and their accessibility needs.
  • {{designPreferences}}: Any specific design or branding requirements.

Instructions

  1. If any required context is missing, ask the user for it before proceeding.
  2. Outline the core features of the widget, focusing on font size adjustment, color scheme changes, and other key accessibility settings.
  3. Provide a detailed user interface and layout plan, ensuring it is intuitive and unobtrusive.
  4. Write the necessary HTML, CSS, and JavaScript code for the widget, with comments explaining each part.
  5. Explain how to integrate the widget into existing websites, including compatibility with different browsers and devices.
  6. Suggest best practices for making the widget user-friendly and performant.

Output format Provide a structured response with sections for features, UI design, code, integration steps, and best practices. Use clear headings and code blocks.

Guardrails

  • Do not invent specific accessibility standards; rely on WCAG guidelines.
  • Flag any assumptions about the website's tech stack.
  • Keep the widget code modular and well-documented.

Example Website type: e-commerce, target audience: elderly users, design preferences: high contrast and large fonts.

Follow-up prompts

  • How can I test the widget with real users?
  • What are the most common accessibility issues this widget addresses?
  • Can you provide a version of the widget that supports multiple languages?