Alt Text Length and Complexity
You'll learn: How to keep alt text concise and handle complex images that need more explanation.
Why Length Matters
Screen readers read alt text aloud, so overly long descriptions frustrate users. Most experts recommend keeping alt text under 150 characters—about one or two sentences. Think of alt text like a text message: you want to convey the essential information quickly, not write an essay.
If your alt text is pushing 200+ characters, you're probably including too much detail for the alt attribute.
Analogy: Imagine someone asking "What's in this photo?" If your answer takes three minutes, you're sharing too much. A quick 10-second summary is usually perfect.
Handling Complex Images
Some images genuinely need longer descriptions: charts, diagrams, infographics, or detailed technical illustrations. For these, you have two better options than cramming everything into alt:
-
Use surrounding text: Place a detailed description in a paragraph or caption right before or after the image. The
alttext becomes a brief summary, and the visible text provides depth everyone can access. -
Use
longdescattribute: You can reference a separate page or section with the full description (though this attribute has limited modern support and isn't widely used anymore).
<!-- Brief alt, detailed visible caption -->
<img src="sales-chart.png" alt="Q4 sales chart showing 20% growth">
<p>The chart displays quarterly sales data from October through December,
with a steady increase from $50K to $60K...</p>
The Goldilocks Principle
Too short: "Chart"
Too long: "A bar chart with blue bars showing sales figures for October at fifty thousand dollars..."
Just right: "Q4 sales chart showing 20% growth"
Key Takeaway: Keep alt text under 150 characters; use visible text descriptions or captions for complex images that need detailed explanations.