How to Write Alt Text for Images (That’s Accessible and SEO-Friendly)

Melwyn Joseph

08 January 2025 | 9 minute read
A man working on a laptop with an alt text example displayed below it.

Everyone knows what alt text is and that it’s necessary. However, many forget that it’s primarily for people with disabilities and often fail to write it in a way that truly serves this purpose.

In this guide, we’ll show you how to write alt text for images that is both accessible and SEO-friendly. By the end, you’ll have the knowledge to master it.

Why Is Alt Text Important?

Alt text is important for two key reasons: accessibility and SEO.

The primary purpose of alt text is to make images accessible. It helps visually impaired and low-vision users understand the content of images on a webpage. It also benefits users with low-bandwidth connections by describing images when they fail to load.

In addition, alt text plays a big role in SEO. It helps search engines like Google understand and rank your images in image search results. While accessibility should always come first, well-written alt text can boost your website’s SEO.

Also, missing alt text is considered an accessibility violation and could put you at risk of legal consequences under laws like the ADA (Americans with Disabilities Act), EAA (European Accessibility Act), and Section 508 compliance requirements.

Which Images Need Alt Text (and Which Don’t)?

Not all images need alt text.

If it doesn’t add value for the user, it’s better to leave it out. Unnecessary alt text frustrates screen reader users instead of helping. Thankfully, W3C (World Wide Web Consortium) provides clear guidelines on which images require alt text.

Images That Need Alt Text

  • Informative images: These represent concepts or information, like photos, illustrations, or charts. The alt text should briefly describe the essential information.
  • Functional images: For images used as buttons or links, the alt text should describe the action or function, like “Print” for a printer icon or “Submit” for a form button.
  • Images of text: If an image contains text, the alt text should match the words in the image. Avoid using images of text unless necessary (e.g., logos).
  • Complex images: For graphs, diagrams, or charts, provide a concise alt text and link to a longer description if detailed information is required.
  • Groups of images: When multiple images convey a single idea, the alt text for one image should describe the entire group.
  • Image maps: Provide alt text for the overall purpose of the image and for each clickable area, describing its function or destination.

Images That Don’t Need Alt Text

  • Decorative images: If the image is purely for decoration and doesn’t add meaningful content, use a null alt attribute (alt=””) so screen readers skip it.

The W3C provides an alt Decision Tree for a quick overview of how to determine which category an image fits into. This tool is especially helpful if you’re unsure whether an image needs alt text or how to write it effectively.

How Long Should Alt Text Be?

Short answer: As concise as possible, while still adequately describing the image and conveying its purpose.

Long answer:

Accessibility Perspective

The W3C (World Wide Web Consortium) states that alt text should be the most concise description possible of the image’s purpose, ideally a short phrase or sentence.

For complex images that need longer descriptions, such as charts or infographics, they suggest linking to a more detailed explanation rather than overloading the alt text itself.

SEO Perspective

Search engines like Google don’t impose any guidelines on alt text length. As Google’s Search Analyst John Mueller explains:

So from an SEO perspective, alt text can be as long as you want, as long as it remains relevant and avoids keyword stuffing

How to Write Alt Text for Images

Writing good alt text is simpler than you think.

If we had to put it simply, here’s the secret to writing alt text that’s both accessible and SEO-friendly: identify the details relevant to the topic or context, convey them as concisely as possible, and naturally include relevant keywords.

For many users, this one-sentence tip might not be enough – they need more guidance on best practices and how to implement them effectively. If that’s you, here are 5 tips to help you write alt text that’s both accessible and SEO-friendly.

Focus on What’s Relevant

When writing alt text, focus on the details that matter most to the topic or context of your content. Including unnecessary details can overwhelm users and dilute the effectiveness of the description.

Consider this example: the details provided depend on the website’s genre or the context of the content.

Bird perched on a tree branch.
  • On a website about parks: “Bird perched on a tree branch.”
  • On a website about birdwatching: “Yellow warbler perched on a tree branch.”

The key is to tailor your alt text to the image’s role in your content. Avoid describing every element of the image unless it’s essential to understanding the context. This approach keeps your alt text concise, meaningful, and user-focused.

Keep Your Alt Text Short

Use just a few words or a single sentence, depending on what the image requires. Avoid long descriptions with flowery language or filler words, as they can distract screen reader users and confuse search engine crawlers.

But how short? We’ve already covered this in detail in the previous section, but for those skimming: a short phrase or sentence is usually ideal. For more complex images, consider using the technique explained below.

Use the “longdesc=” Attribute for Long Descriptions

Some images, like charts, graphs, or infographics, require longer descriptions to effectively convey their details and context. In such cases, you can use the longdesc attribute to provide a link to a more detailed explanation.

For example, a pie chart showing sales distribution across regions might have alt text like “Pie chart showing sales distribution by region”, while the longdesc link leads to a page with the exact percentages and deeper analysis.

You can learn more about implementing longdesc on the W3C website.

Include Relevant Keywords Naturally

To help search engines understand and rank your images, include relevant keywords in your alt text – but do so naturally. Focus on writing for users first and incorporate keywords only when they fit seamlessly within the description.

Consider the following example:

Waterproof hiking boots on a rocky trail.
  • Good alt text: “Waterproof hiking boots on a rocky trail.”

This description is clear and includes the keyword “waterproof hiking boots” without feeling forced.

  • Bad alt text: “Hiking boots waterproof hiking shoes best hiking gear on a rocky trail.”

This example overloads the alt text with keywords, making it unnatural and confusing for both users and search engines.

Avoid Redundant Phrases and Prioritise information

There’s usually no need to include words like “image,” “icon,” or “picture” in the alt text, as screen readers already announce the presence of an image. Only use such terms when it’s necessary to distinguish between types of visuals, like paintings, photographs, or illustrations.

Another key tip for writing alt text is to start with the most important information. This ensures that users relying on screen readers can quickly grasp the key details without having to listen to unnecessary descriptions first.

Tools to Check Missing Alt Text

By now, you understand the importance of alt text. However, your website might have many images without alt text, and finding them manually can be challenging. Fortunately, there are automated tools to help.

WebYes is one of the best tools for checking missing alt text. Audit your website with WebYes, and it will identify images that need alt text while also highlighting other accessibility issues on your website.

If you have a WordPress website, you can use the Alt Text Generator AI plugin. With a simple click, this plugin scans your media library, identifies images without alt text, and uses advanced AI computer vision technology to create descriptive, SEO-friendly alt texts.

Alternatively, you can use tools like Sitechecker, Screaming Frog, and SEOptimer

Tools to Write Good Alt Text

As mentioned earlier, you can use the Alt Text Generator AI to automate the process of writing alt text. The plugin generates alt text automatically and allows you to review it before finalising it. However, it is currently compatible only with WordPress websites.

The interface of the Alt Text Generator AI plugin for WordPress.
Alt Text Generator AI – Interface

Another excellent tool is ChatGPT. This AI chatbot can generate effective alt text when provided with a well-crafted prompt that follows best practices. To make it easier for you, we’ve created a prompt – simply upload the image, copy-paste the prompt, and you’re good to go.

Final Thoughts

Providing alt text is a small but impactful step toward making your website more accessible. It allows disabled users to engage with your content in meaningful ways, creating a more inclusive web experience for everyone.

However, accessibility doesn’t stop at alt text. To truly make your website fully accessible, you need to address other aspects, from navigation to design and compliance with accessibility standards. If you’re unsure where to begin, WebYes is here to guide you.

Run a free accessibility audit today with WebYes to detect barriers and start your journey toward a fully accessible website.


Article by

Logo

Latest Article