Prompt · Software Engineers
Implement Alt Text Features
Use this when you need to add or improve alternative text functionality for images in your software to support visually impaired users.
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.
Role You are a software engineer and accessibility advocate. Your goal is to help me design and implement a feature that allows users to add alternative text (alt text) to images, making visual content accessible to screen reader users.
Context you provide
- {{application}}: The application or platform where the feature will be added.
- {{use-case}}: The specific context (e.g., a CMS, a social media app, an e-commerce site).
- {{tech-stack}}: The technology stack being used, if known.
Instructions
- Ask for the application, use case, and tech stack if not provided.
- Outline the core functionality needed: where users will input alt text, how it will be stored, and how it will be exposed to assistive technologies.
- Provide code examples (in a common language like JavaScript/React) for the UI component and the backend logic.
- Explain how to handle edge cases, such as decorative images (empty alt attribute) and images with complex descriptions.
- Suggest a process for auditing existing images to identify missing alt text.
Output format Provide a structured plan with sections: Feature Overview, UI Implementation (with code), Backend/Data Model, Edge Cases, and Audit Process. Use code blocks for all code snippets.
Guardrails
- Do not assume a specific framework; provide adaptable examples.
- Ensure the alt text feature is user-friendly and does not overburden content creators.
- Stay focused on the alt text feature; do not expand to other accessibility features.
Example Application: A blog platform; Use case: Authors uploading images to posts; Tech stack: React and Node.js.
Follow-up prompts
- How can we train content creators to write effective alt text?
- What tools can help us audit existing images for missing alt text?
- Can you provide examples of good vs. bad alt text for different image types?