Understanding Alt Text, Labels, and Titles
Quick reference guide for accessible markup
Images: The alt Attribute
Purpose: Describes images for screen readers and displays when images fail to load.
DO
- Use
alt=""for purely decorative images - Write concise, descriptive text for meaningful images
- Include text that appears in images of text
DON'T
- Use "image of" or "picture of" (redundant)
- Omit alt attribute entirely
- Use alt text for non-decorative images that's empty
Examples:
<img src="logo.png" alt="Acme Company">- Logo with company name<img src="divider.png" alt="">- Decorative divider<img src="chart.png" alt="Sales increased 40% in Q4">- Informative chart
Form Fields: <label> vs aria-label vs title
Use <label> first (preferred): Visible text that screen readers announce and users can click to focus the field.
<label for="email">Email:</label> <input id="email">- Or wrap:
<label>Email: <input></label>
Use aria-label: When you can't add a visible label (like icon-only search fields).
<input type="search" aria-label="Search products">
Avoid title attribute: Only appears on hover, not accessible to keyboard/touch users, not announced consistently by screen readers. Use <label> or aria-label instead.
GOOD
<label for="name">Full Name</label>
<input id="name">
BAD
<input placeholder="Enter name" title="Full Name">
Placeholder is not a label!
Buttons: Text vs aria-label vs title
Use visible text (preferred): Best for usability and accessibility.
<button>Submit Form</button>
Use aria-label for icon-only buttons:
<button aria-label="Close dialog">?</button><button aria-label="Play video">?</button>
Avoid title on buttons: If the button already has visible text or aria-label, title is redundant. Screen readers might announce both, creating confusion.
Links: Text vs title Attribute
Use descriptive link text (always):
<a href="/pricing">View pricing plans</a>
The title attribute on links:
- Usually unnecessary if link text is already clear
- Only use when providing truly additional context not in the link text
- Don't repeat the link text in the title attribute
OKAY (if adding value)
<a href="/report.pdf" title="PDF, 2.3 MB">Annual Report</a>
REDUNDANT
<a href="/pricing" title="Pricing">Pricing</a>
Quick Decision Tree
For Images: Always use alt attribute (use alt="" if decorative)
For Form Fields:
- Can you add visible text? Use
<label> - No visible label possible? Use
aria-label - Never rely on
titleorplaceholderalone
For Buttons:
- Can you add visible text? Just use text content
- Icon-only button? Use
aria-label - Don't add
titleif you already have text or aria-label
For Links:
- Make link text descriptive (never "click here")
- Only use
titleif adding genuinely useful info (file size, format) - Never duplicate link text in
title
This tool is part of The Laughing Professor On Page SEO Toolbox, where multiple diagnostics and generators are combined into a single workflow for site optimization.
FAQ
- "Can I use this tool outside the toolbox?"
- "Does this tool replace a full audit?"
- "Is this tool free?"
Yes, all our toolbox, tool pages are designed to work on their own from any browser.
No, This aid is to better inform and help you optimize your web pages for SEO
Yes, We don't require any subscription, or sign-in - No email required.