How to write effective alt text for images

What is Alt Text?

Alt text (alternative text) is a short, written description of an image that conveys its content and function. It is essential for visually impaired users who rely on screen readers and also serves as a fallback if an image fails to load.

Why is Alt Text Important?

  • Accessibility โ€“ It ensures visually impaired users can understand the imageโ€™s purpose.
  • SEO Benefits โ€“ Well-written alt text helps search engines index images, improving search rankings. However, avoid keyword stuffingโ€”search engines penalise sites that misuse alt text for SEO rather than accessibility.
  • Better User Experience โ€“ Some users deliberately disable images to improve page load speed, and alt text ensures they still understand the content.

Best Practices for Writing Alt Text

Be Descriptive, Not Redundant
Donโ€™t just state what the image represents; describe whatโ€™s actually in it. For example, in e-commerce, an image might represent the Menswear department, but instead of writing:<img src="menswear.jpg" alt="Menswear">Write something more contextual:<img src="menswear.jpg" alt="A well-dressed man in a tailored navy suit adjusting his tie, standing in a modern office.">This provides a richer description that fits within the brand’s lifestyle aesthetic.

Consider the Context of the Image
Alt text should align with the surrounding content and convey emotional or contextual meaning where relevant. For example:<img src="polar-bear.jpg" alt="A polar bear standing on a shrinking ice floe, highlighting the impact of climate change on Arctic wildlife.">Similarly, for a motivational blog post:<img src="marathon.jpg" alt="A determined woman crosses the marathon finish line, arms raised in triumph, after a long and exhausting race.">This makes the image more impactful for screen reader users.

Keep It Concise
The recommended character limit for alt text is 125 characters. While some screen readers will read longer descriptions, keeping it concise ensures the most important information is conveyed efficiently.

Avoid “Image of” or “Picture of”
Screen readers already indicate that an alt attribute is for an image, so saying โ€œImage ofโ€ is redundant.

Use Keywords Wisely
While alt text can support SEO, avoid keyword stuffing. Focus on writing for accessibility first. For example, writing:<img src="running-shoes.jpg" alt="Running shoes trainers sneakers fitness workout">is bad practice. Instead, provide a meaningful description:<img src="running-shoes.jpg" alt="A pair of lightweight running shoes with cushioned soles, designed for long-distance runners.">

When Is an Image Decorative?

Not all images need alt text. If an image is purely decorative (e.g., background patterns, spacers), use:

<img src="decorative-pattern.jpg" alt="">

This tells screen readers to ignore it, reducing unnecessary distractions.

Examples of Decorative Images:

  • Background textures (e.g., faint watermarks)
  • Ornamental flourishes that do not convey meaning
  • Icons that are purely aesthetic and not interactive
  • Spacer images used for layout purposes

AI-Generated Alt Text: Proceed with Caution

AI-powered tools can generate alt text, but they are not always accurate. Itโ€™s essential to review and edit AI-generated descriptions to ensure correctness and relevance. AI might:

  • Miss key details
  • Misinterpret objects
  • Fail to capture the emotional context of an image

For example, AI might output:

<img src="smiling-person.jpg" alt="Person smiling">

Instead of the more meaningful:

<img src="smiling-person.jpg" alt="A young woman laughing while holding a coffee cup in a cosy cafรฉ.">

Always check and refine AI-generated alt text to maintain quality.

Background Images: A Missed Accessibility Opportunity

Some websites use background images in CSS, which cannot have alt text. This is problematic because:

  • Screen readers cannot interpret background images.
  • If the image conveys important meaning, it should be placed in an <img> element with appropriate alt text.
  • If using CSS background images, ensure there is meaningful text content nearby that conveys the same information.

Instead of using a background image for key content, structure it like this:

<figure> <img src="team-photo.jpg" alt="A diverse team of professionals collaborating in a modern office."> <figcaption>Our team works together to create innovative solutions.</figcaption> </figure>

This way, both visual and non-visual users benefit from the information.

How to Apply Alt Text in the <picture> Element

The <picture> element allows you to provide multiple versions of an image for different screen sizes or resolutions. However, alt text is still applied within the <img> element inside the <picture> element, like this:

<picture> <source srcset="image-large.jpg" media="(min-width: 800px)"> <source srcset="image-medium.jpg" media="(min-width: 500px)"> <img src="image-small.jpg" alt="A scenic view of rolling green hills under a golden sunset."> </picture>

Screen readers will read the alt text from the <img> tag, regardless of which image version is displayed.

Alt Text for <svg> Elements

SVGs (Scalable Vector Graphics) do not use the standard alt attribute but should still be made accessible. Use title and desc elements inside the <svg>:

<svg role="img" aria-labelledby="svgTitle svgDesc"> <title id="svgTitle">Company Logo</title> <desc id="svgDesc">A modern minimalist logo with a blue and green colour scheme.</desc> <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="blue" /> </svg>

For purely decorative SVGs, use role="presentation":

<svg role="presentation" aria-hidden="true"> <!-- Decorative content --> </svg>

Final Thoughts

Alt text plays a crucial role in accessibility and SEO. Writing meaningful, contextual, and concise descriptions ensures all users benefit from the images on your website. Remember to always consider the context, review AI-generated alt text, and prioritise clarity over generic descriptions. Additionally, be mindful of background images, SVG accessibility, and proper <picture> element usage to ensure a fully inclusive experience.

Similar posts

Discover how weโ€™ve helped organisations overcome accessibility challenges and achieve success.

FAQs

Punctuation makes image descriptions easier to read and understand; it helps us know when to take a pause and gain more context of the words in front of us, and alt text is no exception.

ย 

Screen readers recognise periods, commas, question marks, and exclamation marks, and will often pause briefly to make descriptions easier to follow. However, it is important to not rely on punctuation alone, as some users adjust their screen reader speed and may not hear every pause.

ย 

Ensure that your text still makes sense even without punctuation. To use a well-known example, โ€œLetโ€™s eat, Grandma!โ€ conveys a very different meaning than โ€œLetโ€™s eat Grandma!โ€

Yes, it should include keywords, but only when they fit naturally. The primary purpose of alt text is accessibility, which, in turn, supports SEO. Well-written descriptions that prioritise clarity help assistive technology users first, while also giving search engines meaningful context about your image.

ย 

However, you should never use image descriptions as an opportunity to cram unnecessary or irrelevant words with the goal of boosting SEO. If your images have purpose and relate to the surrounding content, you will find it easier to add the right keywords naturally rather than forcing them.

There is no legal requirement for tense; however, the general consensus is that it should be using the present tense.

ย 

Writing in the present keeps it conversational, immediate, and aligned with how screen readers announce content as it appears on the page. Although past tense isnโ€™t technically incorrect, it can make alt attributes feel outdated or disconnected from the userโ€™s current experience.

A bad alt attribute can usually be determined by one or more of the following issues:

ย 

  • Too vague e.g. alt = โ€œvaseโ€ or alt = โ€œtreeโ€

  • Irrelevant to the actual image e.g. alt = โ€œdresses for saleโ€ on an image of mountains

  • Too stuffed with keywords e.g. alt = โ€œblue jeans denim trousers casual pants fashionโ€

ย 

Earlier in this guide we showed some alt text examples, including a poor alt attribute vs a more descriptive version. See the How to write alt text section for more details and examples.

Website accessibility monitoring is the fundamental process of scanning your website to detect any issues that could prevent users with disabilities from using it. Automated web accessibility monitoring tools continuously check for accessibility issues across your site, providing instant alerts for new and updated content, as well as your overall site health.

ย 

They track compliance with standards like the Web Content Accessibility Guidelines (WCAG) and show you how accessible your site is, where it should be, and what improvements should be made to deliver a better experience for all users.

ย 

In addition to measuring your compliance, they also provide a clear picture of your progress over time, so you can track the impact of your improvements and maintain ongoing accessibility.

The two main types are automated and manual monitoring. Together, they provide you with a comprehensive view of how accessible your site is and where improvements are needed.

ย 

  • Automated monitoring uses specialised web accessibility monitoring tools to scan your website for non-compliant features and common issues, such as missing alt text, poor colour contrast, or keyword navigability issues. These tools can also provide instant alerts for when site elements present accessibility risks and site health reports so you can prioritise any issues.

  • Manual monitoring is where accessibility experts and testers come in to review your site as a real user would, often using assistive technologies like screen readers. They will usually check how easy it is to navigate through pages, interact with content, and understand messages or instructions. The aim is to identify any areas which may present barriers for individuals with disabilities.

Accessibility monitoring is crucial for ensuring that everyone can use and experience your site in the same way, regardless of ability. It is also essential for staying compliant with standards like WCAG and with laws like The European Accessibility Act 2025.

ย 

Without regular monitoring, accessibility issues can easily appear when new pages are added, content is updated, or designs are changed.

ย 

Continuous website accessibility monitoring gives you a framework to:

  • Stay compliant

  • Improve user experience

  • Respond to issues quickly

  • Track progress over time

Accessibility monitoring should be integrated into your process rather than a one-time check. Websites can change frequently, with new pages, designs, and content changes, but each update can introduce accessibility issues.

ย 

Continuous monitoring, both manual and through an automated website monitor, is recommended to catch any issues as soon as they appear, particularly after any big changes, such as adding interactive elements, redesigns, and when legal or accessibility guidelines are updated.

ย 

Even without significant changes, monitoring should be a consistent part of your organisations website maintenance.

ย 

The more you test the better, but for those looking for an exact amount, ideally once a month is a good starting point to catch any emerging issues.

Book a meeting

This field is for validation purposes and should be left unchanged.

Signup

This field is for validation purposes and should be left unchanged.