A comprehensive guide to writing effective image descriptions that make the web accessible to everyone.
Alt text (alternative text) is a written description of an image that appears in place of the image when it cannot be viewed. It's typically added to an image through the alt
attribute in HTML or through accessibility options in social media platforms.
Alt text serves as a textual replacement for visual content, making information accessible to:
Alt text is not just a technical requirement—it's a fundamental aspect of creating an inclusive web experience. Here's why it matters:
For blind or low-vision users who rely on screen readers, alt text is their only way to understand the content and context of images. Without alt text, important information is completely lost.
Alt text benefits everyone, not just screen reader users. Many people choose to turn off images to save data, reduce distractions, or improve loading times on slow connections. For them, well-written alt text is the only way to understand what would have been shown.
"Alt text is shown when someone decides to turn off images in their browsers. So it has positive side-effects besides just accessibility."
Search engines can't "see" images, but they can read alt text. Descriptive alt text helps search engines understand and properly index your images, potentially improving your content's discoverability.
In many jurisdictions, providing accessible content (including alt text for images) is a legal requirement for certain websites, particularly for government, education, and business sites.
Effective alt text isn't just about writing any description—it's about providing the right information in the right way:
Focus on what's important about the image in the context of the surrounding content. The same image might need different alt text depending on why it's being shared.
Cover the essential elements without being overly verbose. Focus on what matters, not every minor detail. As a general guideline, aim for 8-80 characters, though complex images may require more.
Don't start with phrases like "image of" or "picture showing" as screen readers already announce that it's an image before reading the alt text.
If an image serves a specific function (like a button or link), make sure to describe both what it shows and what it does.
If the image contains text, include that text in your alt description, especially if it's important to understanding the content.
When people struggle with writing alt text, they often overthink it. Start by asking yourself, "What's the main subject here?" For example, "A lady sitting in a wheelchair reading a book" may be all you need rather than describing every detail in the background.
Creating good alt text can sometimes feel challenging, especially when you're just starting out. This is where Altbot can help!
Altbot is a bot designed specifically to generate quality alt text for images on the Fediverse. It uses advanced local image processing to analyze images and create detailed, contextually appropriate descriptions.
While Altbot provides excellent starting points, it's important to remember that AI-generated alt text should always be reviewed and edited by humans. Here's why:
"A large yellow school bus parked in front of a brick building with several windows. The bus appears to be empty and the doors are closed. The sky is clear blue and there are some trees visible in the background."
"Our new school bus arriving at Washington Elementary for the first day of school. It is a large yellow school bus parked in front of a brick building with several windows. The bus appears to be empty and the doors are closed. "
The human editor added context about why the image is being shared (first day of school) and removed less relevant details about the sky and trees.
To use Altbot for generating alt text:
Always review and edit AI-generated alt text. Think of Altbot as a skilled assistant, not a replacement for your judgment and understanding of context.
Follow this simple process to create effective alt text for any image:
Ask yourself why the image is being shared. Is it to convey information, evoke emotion, illustrate a concept, or serve as decoration?
Determine what's most important about the image. What are the main subjects or actions? What would someone miss if they couldn't see it?
How does this image relate to the surrounding content? The same photo might need different alt text depending on what point it's illustrating.
Based on the previous steps, write a description that:
Ask yourself:
Learning by example can help you understand what makes alt text effective:
"Dog"
Too vague, provides no meaningful details about the image.
"Image of a cute black dog sitting on the floor and looking at the camera with its adorable puppy eyes and shiny black coat against the wooden background with nice lighting."
Too verbose, includes unnecessary details and subjective judgments like "cute" and "adorable."
"Black labrador puppy sitting on wooden floorboards, looking directly at the camera with its head slightly tilted."
Specific about the breed, posture, and setting without being overly detailed or subjective.
"My desk"
Too vague, gives no information about what's on the desk.
"Image showing a wooden desk with a laptop and coffee cup and notepad in a workspace environment with good lighting."
Redundant phrasing ("Image showing") and includes unnecessary details about lighting.
"Wooden desk with an open laptop displaying code, a notepad, and a cup of coffee."
Clearly describes the main elements without being overly detailed, and notes the code on the laptop which might be contextually important.
Image Type | Poor Alt Text | Good Alt Text |
---|---|---|
Portrait photo | "Me" | "Woman with curly red hair smiling, wearing a blue blazer against a white background." |
Landscape | "Beautiful sunset" | "Sun setting over mountains reflected in a calm lake, with silhouettes of pine trees in the foreground." |
Chart/Graph | "Sales data" | "Bar chart showing monthly sales growth from January to June 2024, with March having the highest increase of 45%." |
Meme | "Funny cat meme" | "Grumpy Cat meme with text reading 'I had fun once. It was awful.'" |
Even with the best intentions, these common pitfalls can make your alt text less effective:
Screen readers already announce to users that they're encountering an image before reading the alt text. Adding these phrases creates redundancy.
Descriptions like "chart," "dog," or "landscape" don't provide enough information to be useful.
Not everything in an image needs to be described. Focus on what's important in the context of your content.
"Every situation is different of course, but ... the rest was just mainly eye candy."
Unless your audience expects technical terminology, use clear, everyday language.
If there's text in the image, especially important text like quotes or labels, include it in your alt text.
Be cautious about attributing emotions or intentions unless they're obvious. "Woman laughing" is usually safe, but "Woman contemplating her future" might be an assumption.
Alt text like "IMG_20240415.jpg" or "DSC_1234" provides no useful information.
Different types of visual content may require different approaches:
Focus on the main trend or conclusion the data is showing, and include key values or comparisons. For complex charts, consider providing a more detailed data table elsewhere in addition to alt text.
Example: "Line graph showing temperature increase of 2.5°C from 1980 to 2023, with the steepest rise occurring after 2010."
Describe the overall purpose, then summarize the main components and relationships. For complex diagrams, consider providing a longer text alternative elsewhere.
Example: "Infographic showing 5 steps of the water cycle: evaporation, condensation, precipitation, collection, and transpiration, with arrows indicating the circular process."
Describe both the visual elements and any text overlay, since both are usually essential to understanding the joke.
Example: "Two-panel Spider-Man meme: first panel shows Peter Parker with glasses seeing clearly; second panel shows him without glasses squinting. Text reads 'Looking at your code at 5pm vs. Looking at it the next morning.'"
If an image is purely decorative and adds no information, using an empty alt attribute (alt=""
) is appropriate, which tells screen readers to skip it.
Describe the subject, composition, and important visual elements, without subjective interpretation unless that's specifically relevant.
Example: "Black and white photograph of an elderly person's hands holding a young child's hands, with deep wrinkles contrasting with smooth skin."
Wondering if your alt text is effective? Use this tool to evaluate the quality of your image descriptions.
Note: This is a demo and does some basic evaluation, but only a person can truly judge the quality of alt text.
Paste your alt text below to get feedback on its effectiveness:
Your alt text could be more effective. Consider these suggestions:
Your alt text has some good elements, but could be improved:
Your alt text is effective and follows best practices:
Want to learn more about creating effective alt text? Check out these resources:
Remember, good alt text is a skill that improves with practice. The more you write image descriptions, the more naturally it will come to you!