1. The Four Image Attributes
Every content image on a website needs up to four types of descriptive text. Each serves a different audience and purpose.
| Attribute | What It Does | Who Sees It | Required? |
|---|---|---|---|
| alt | Screen reader text. Describes what the image shows. Also appears when images fail to load. | Screen readers, search engines, broken-image fallback | Always (empty alt="" for decorative) |
| title | Tooltip on desktop hover. Provides supplementary context. | Sighted desktop users (hover only). Not reliable on mobile or screen readers. | Recommended for content images |
| caption | Visible text below the image via <figure> + <figcaption>. Provides context everyone can read. |
All users (visual) | Recommended for content images |
| description | Extended detail via aria-describedby. For complex images (charts, technical diagrams, spec drawings). |
Screen readers (announced after the name) | Only for complex images |
alt and title should not duplicate each other. Alt describes what the image shows. Title adds context about what happens when you interact with it, or provides a short label. Caption tells the story. Description provides technical depth.
How They Work Together
<div id="chassis-specs" class="sr-only">
What Each Audience Receives
| Audience | What They Get |
|---|---|
| Screen reader user | Alt text read first, then aria-describedby content if they request more detail |
| Sighted desktop user | Image visible, title tooltip on hover, caption text below |
| Mobile user | Image visible, caption text below (no hover tooltip) |
| Search engine | Alt text + surrounding text (caption, headings) for indexing |
| Broken image / slow connection | Alt text displayed in the broken-image placeholder |
2. Image Classification & Treatment
Not every image needs all four attributes. The treatment depends on the image's purpose.
Content Images
Convey information, meaning, or context. Removing them would change the page's meaning.
- Product photos — what you're selling
- Gallery images — completed builds, project showcases
- Technical diagrams — spec drawings, exploded views, CAD renders
- Team/about photos — people behind the brand
- Before/after images — transformation shots
Functional Images
Trigger an action — links, buttons, navigation elements.
- Logo linking to homepage
- Social media icons linking to profiles
- Product thumbnails linking to product pages
- Search / cart / menu icons
alt="Patriot Chassis - Home" not alt="Patriot Chassis logo". Search icon: alt="Search" not alt="magnifying glass". No caption or description needed.
Decorative Images
Add visual appeal but convey no information. Removing them wouldn't change meaning.
- Background textures and patterns
- Ornamental dividers and borders
- Ambient/mood photos used purely for atmosphere
- Icons that duplicate adjacent text labels
alt="" (empty, not missing). No title, no caption, no description. Ideally implement as CSS background images instead. Never describe decorative images — it creates noise for screen reader users.
Quick Reference
| Image Type | alt | title | caption | description |
|---|---|---|---|---|
| Product photo | Describe the product + view | Product name | Context / key feature | If complex (specs, diagrams) |
| Gallery image | Describe what's shown | Short label | Build details / story | Rarely needed |
| Technical drawing | Identify the diagram | Drawing title | What it illustrates | Full spec data (required) |
| Logo (linked) | Brand name + destination | Not needed | Not needed | Not needed |
| Icon with text label | alt="" (decorative) |
Not needed | Not needed | Not needed |
| Background texture | CSS background (no alt) | Not needed | Not needed | Not needed |
| Hero banner (CSS bg) | role="img" + aria-label |
Not needed | Not needed | If complex scene |
3. The Alt Text Decision Tree
Use this flowchart when deciding what descriptive text an image needs. Based on the W3C WAI Alt Decision Tree.
alt="". If the text only exists in the image (sale badges, promotional banners), put that text verbatim in alt.
alt="" on the image to avoid redundancy.
aria-describedby.
alt="". Do not describe it. Better yet, implement it as a CSS background image.
4. How to Write Effective Alt Text
The Formula
For product and content images, follow this pattern:
Length
- Target: 80–140 characters. Long enough to be useful, short enough to not burden screen reader users.
- Screen readers do not cut off at 125 characters (that's a myth), but excessively long alt text becomes hard to listen to.
- If you need more than 150 characters, use
aria-describedbyfor the extended detail.
Voice & Tone
- Be specific, not generic. "Steel truck chassis" is weak. "Patriot HD-4500 boxed steel frame with integrated crossmember gussets" is strong.
- Describe what matters. A product photo should describe the product. A lifestyle photo should describe the scene and context.
- Use the language your customers use. If your audience says "coilovers" not "coilover shock absorbers," match that.
- Be factual, not promotional. Alt text is not ad copy. Describe what you see, not what you're selling.
Good vs. Bad Examples
| Image | Bad Alt Text | Good Alt Text |
|---|---|---|
| Full chassis, 3/4 view | alt="chassis" |
alt="Patriot HD-4500 rolling chassis, front three-quarter view, black powder coat with Fox coilovers visible" |
| Air shock closeup | alt="product image" |
alt="Patriot Air Shock mounted on K5 Blazer rear axle, showing remote reservoir and braided line" |
| Welding action shot | alt="IMG_2847.jpg" |
alt="Fabricator TIG welding a frame rail joint in the Patriot Chassis Idaho shop" |
| Size chart | alt="size chart" |
alt="Chassis dimension chart showing length, width, and wheelbase measurements. Full data in table below." |
| Logo in navbar | alt="logo.png" |
alt="Patriot Chassis" |
| Decorative divider | alt="red line divider" |
alt="" |
Rules
alt="DSC_0042_final_v3.jpg" is the single worst accessibility failure. If your CMS auto-populates filenames, override them.
alt="truck chassis steel frame buy online best price custom build" hurts both accessibility and SEO. Google penalizes keyword stuffing.
alt="Patriot Chassis" provide zero differentiation. Each image should describe what is uniquely visible.
src must also swap the alt.
5. How to Write Captions
Captions are the visible text below an image, implemented with <figure> and <figcaption>. Unlike alt text, captions are for everyone.
Caption vs. Alt Text
| Aspect | Alt Text | Caption |
|---|---|---|
| Audience | Screen readers, search engines | All users (visual) |
| Purpose | Describe what the image shows | Explain why the image matters, tell the story |
| Tone | Factual, descriptive | Can be narrative, contextual, even promotional |
| Length | 80-140 characters | 1-3 sentences |
| Duplication | They should complement each other, not duplicate | |
When Captions Are Required
- Product photos on detail pages — caption describes key features or selling points
- Gallery images — caption tells the build story or identifies the vehicle
- Technical images — caption explains what the diagram illustrates
- Before/after photos — caption explains the transformation
When Captions Are Optional
- Product thumbnails in grid/catalog views (product name serves as caption)
- Hero images (the hero text itself provides context)
- Team headshots with name/title already displayed nearby
Example: Alt + Caption Working Together
Notice: the alt describes what you see (a close-up of a weld). The caption tells why it matters (welding standards, quality commitment). They complement, not duplicate.
6. Long Descriptions (aria-describedby)
Some images are too complex for a short alt text. Technical diagrams, size charts, spec drawings, exploded views, and infographics need an extended description.
When to Use Long Descriptions
- Charts and graphs — the data points matter, not just "a bar chart"
- Exploded-view diagrams — parts identification, assembly order
- Size/dimension charts — all measurements need to be in text
- Comparison images — before/after with measurable differences
- Maps and schematics — locations, routes, spatial relationships
Five Techniques (Ranked by Reliability)
1. Adjacent visible text or data table (best)
Place the description or data table directly on the page near the image. Works for all users, all technologies.
2. Collapsible <details> / <summary> (good for space)
<details>
3. aria-describedby (good for text-only descriptions)
<div id="chart-desc" class="sr-only">
aria-describedby content as one continuous paragraph. Any structural markup (headings, tables, lists) inside the referenced element is stripped. Use only for prose descriptions.
4. Linked separate page (for very long descriptions)
A standard link to a dedicated description page. Discoverable and functional for all users.
5. longdesc attribute (deprecated — do not use)
Removed from HTML5. Unreliable browser support. Replace with any of the above.
7. E-Commerce Product Images
55% of e-commerce sites fail to provide adequate alt text for product images (Baymard Institute). This is both an accessibility failure and a missed SEO opportunity.
Product Image Alt Text Formula
Multiple Product Images
Each image in a product gallery needs unique alt text describing what that specific view reveals.
| View | Alt Text Example |
|---|---|
| Hero / front | "Patriot HD-4500 steel frame, front three-quarter view, black powder coat finish" |
| Side profile | "HD-4500 frame side view showing 6-point suspension mount configuration" |
| Rear | "HD-4500 rear crossmember with Class V hitch receiver and tow loops" |
| Detail / close-up | "Close-up of HD-4500 boxed frame rail showing CNC-cut fishmouth joints" |
| Installed / lifestyle | "HD-4500 chassis installed under 1972 Chevy K20, driving on rocky desert trail" |
| Underside | "HD-4500 undercarriage view showing 4-link rear suspension and crossmember clearance" |
Color Variants
- Alt text must reflect the specific variant being shown
- When the displayed image changes based on user selection, the alt text must update dynamically via JavaScript
- If color names are unusual, include the base color:
"Desert Sand (tan) powder coat"
Product Thumbnails in Catalog
- Thumbnails that link to product pages: alt describes the product (it's a functional image)
- If the product name is already visible as text near the thumbnail, use a shorter alt that adds visual detail not in the name
8. CSS Background Images
CSS background images have no native alt text mechanism. If a background image conveys meaning, you must add accessibility through markup.
Meaningful Background Images
Hero banners, section backgrounds with content imagery, and call-to-action backgrounds that set a scene.
<section class="hero" role="img" aria-label="Classic truck driving through Idaho mountain pass at golden hour">
role="img" to an element causes screen readers to treat it as an image. If the element also contains child text content, that text may be obscured. For elements that must contain both a background description and child content, use a visually hidden <span> inside instead of role="img".
Decorative Background Images
- No
role="img"needed - No
aria-labelneeded - This is the preferred location for decorative images — better than
<img alt="">
SEO Note
<img> element with proper alt text. Use CSS backgrounds only for decorative/atmospheric images.
9. Image SEO & Filenames
File Naming Convention
Google reads filenames for context. Use descriptive, hyphenated names.
| Bad | Good |
|---|---|
IMG_2847.jpg |
patriot-chassis-hd4500-front-view.jpg |
product_12847.jpg |
air-shock-k5-blazer-rear-axle-mount.jpg |
DSC_0042_FINAL_v3.jpg |
tig-weld-frame-rail-detail.jpg |
hero-banner.png |
k5-blazer-desert-trail-action-shot.jpg |
SEO Signals by Attribute
| Attribute | SEO Impact |
|---|---|
| alt text | Primary signal. Google uses it alongside computer vision for image indexing. |
| Filename | Secondary signal. Descriptive names help Google understand image content. |
| figcaption / surrounding text | Contextual signal. Google reads nearby text to understand image relevance. |
| title attribute | Minimal to zero impact. |
| ARIA attributes | Zero impact. Not read by search engine crawlers. |
| Schema.org ImageObject | Helps images appear in rich results (product carousels, recipes, etc.). |
Image Sitemap
Helps Google discover images it might miss, especially from CDN subdomains. Include in your sitemap.xml.
10. 12 Common Mistakes
alt="". A missing alt causes screen readers to read the full filename aloud. This is the single worst image accessibility failure.
alt="IMG_2847.jpg" provides no meaningful information. Often caused by CMS auto-population. Always override.
alt="truck chassis steel frame buy custom best price" hurts both accessibility (word soup) and SEO (Google penalizes it).
alt="Patriot Chassis" provide no differentiation. Each image should describe what is uniquely visible.
alt="Blue decorative divider line" creates screen reader noise for zero benefit. Use alt="".
aria-describedby for the extended detail.
title attribute is not reliably announced by screen readers and is invisible on mobile devices. It is not a substitute for alt.
role="img" and aria-label.
src but not the alt create a disconnect between what users hear and see.
11. WCAG & Legal Requirements
WCAG 2.2 Success Criteria
| Criterion | Level | What It Requires |
|---|---|---|
| 1.1.1 Non-text Content | A | All non-text content has a text alternative that serves the equivalent purpose |
| 1.4.5 Images of Text | AA | Text should not be presented as images unless essential (e.g., logos) |
| 1.4.9 Images of Text (No Exception) | AAA | Images of text only used for pure decoration or essential presentation |
Legal Deadlines
- EU Accessibility Act: June 28, 2025 — enforces accessibility for all e-commerce sites selling to EU consumers
- US ADA Title II: April 24, 2026 (large entities), April 24, 2027 (smaller) — WCAG 2.1 AA compliance required for government-related sites; private sector increasingly exposed via case law
- WCAG 2.2: Approved as ISO/IEC 40500:2025 (October 2025) — now the international reference standard
12. Audit Checklist
Use this checklist during Phase 5 (Polish) to verify every image on the site. The Alt Text View mode (?alt) automates part of this, but manual review is still required for quality.
Automated Checks (Alt Text View)
- Every
<img>has analtattribute (present, not missing) - Every
<img>has atitleattribute - Images inside
<figure>have a matching<figcaption> - CSS background images that convey meaning have
role="img"+aria-label
Manual Quality Checks
- No alt text is a filename
- No alt text begins with "image of" or "photo of"
- No alt text duplicates adjacent heading or link text
- Decorative images have
alt=""(empty, not missing) - Functional images describe the action/destination
- Complex images have both short alt + long description
- Product images have unique alt text per variant/angle
- Alt text is under 150 characters (or uses long-description mechanism)
- Dynamically loaded images have alt that updates with the image
- All
<figure>elements include bothalton the<img>and a<figcaption>
Screen Reader Test
- Navigate through all images using the screen reader's image navigation shortcut
- Listen for: filenames being read, missing announcements, redundant text, unclear descriptions
- Verify that image links and buttons have understandable focus announcements
Visual Test
- Disable images in the browser — can you still understand the page content?
- Check that alt text appears in the broken-image placeholder and makes sense