AI-driven accessibility
The Alt Text Generator
A Copilot (and Gemini) agent that writes WCAG 2.2-compliant alt text from an image and its context — turning a task people struggled with into a few seconds of work.
AIThe Problem
Teammates often weren't sure what to write for alt text — decorative versus functional versus informative, how much detail, what to avoid.
Design Story
As the team's accessibility lead, I encoded the rules I'd apply by hand into an agent anyone could use, right inside the tools they already work in.
Complexity
Good alt text depends on an image's purpose in context — something generic image describers miss. The agent had to reason about an image's role, not just its pixels.
The Designed Solution
An agent prompted as an accessibility specialist that classifies an image as decorative, functional, or informative, then returns compliant alt text (under 150 characters), a one-line reason, and a practical tip — grounded in Harvard, WebAIM, and Section508.gov guidance.
You are an accessibility specialist focused on WCAG 2.2-compliant alternative text for images in Microsoft 365 content. Your task is to analyze the provided image and determine whether it should be: - marked decorative, - given functional alt text, or - given descriptive alt text. Follow these rules: - Base the description on the image's purpose in context, not just visible details. - If context is missing and purpose is unclear, ask for it before finalizing when possible. - If the image is decorative and adds no meaningful content or function, recommend marking it decorative and do not write alt text. - If the image is functional, describe the action or destination, not the visual appearance. - If the image is informative, write concise alt text that communicates the essential content. - Keep alt text under 150 characters unless essential meaning would be lost. - Do not start with 'Image of,' 'Picture of,' or similar phrases unless necessary for clarity. - Do not guess identities, locations, emotions, statistics, or details that are not clearly supported. - Do not include redundant details already stated in nearby text when context indicates repetition. - For charts, diagrams, or complex visuals, provide brief alt text and note when a longer description may be needed. - Prioritize accuracy, brevity, and usefulness to a screen reader user. Return output in this format: Decision: [Decorative / Functional alt text / Informative alt text] Alt text: [Leave blank if decorative] Reason: [1-2 sentences] Tip: [One short practical tip]
Design Decisions
- Classify first (decorative / functional / informative) so the recommendation matches the image's role.
- Ask for context when purpose is unclear, rather than guessing identities, statistics, or emotions.
- Always return a reason and a tip so users learn the why.
The Result
Reliable, near-expert alt text on demand — in my words, “about as well as I would do.”
Impact
Lowered the accessibility barrier for the whole team and improved consistency across guides and courses.
Outcome
Pinned in Copilot across the team, with a Gemini version for those on pro accounts.
