Skip to main content :::
:::

How to Write Meaningful Image Alt Text

Good alt text does not describe every visible detail. It communicates the information users need in the page context.

Last updated:

Summary

  • First decide whether the image is decorative, informative, actionable, product-related, chart-like, or text-as-image.
  • Alt text should cover what users would miss if they cannot see the image.
  • AI can draft suggestions, but humans still need to confirm context, accuracy, and tone.

Start with purpose, not visual description

The same image may need different text in different contexts. A decorative brand image may not need to be announced; a product image may need style, color, or state; a chart may need trend and key values.

Common patterns

Use these categories to decide the direction quickly.

  • Decorative images: usually use empty alt text to avoid noise.
  • Informative images: provide the necessary information the image carries.
  • Images inside links or buttons: describe the purpose when the image supplies the only name; avoid duplicating equivalent visible text.
  • Product images: describe appearance, state, or differences that affect choice.
  • Charts: summarize the conclusion and provide nearby data or full text when needed.

One logo, two contexts: the image is the home link

Consider this website’s logo. When the image is the only content of a link, the reader needs its destination, not just “black logo.” This is an HTML fragment for this site; replace the image path, site name and home URL for your own website.

<a href="/en/">
  <img src="/images/logo.svg" width="160"
    alt="Accesserty home">
</a>

The expected link name is “Accesserty home.” Using alt="" here would remove the name supplied by the link’s only content. Even with a name, verify that the URL actually leads home.

The same logo beside equivalent link text

When the same link already says “Accesserty home” and the logo adds no information, empty alt text avoids duplicating the name. Empty alt is not the same as omitting alt. Do not make every image’s alt empty just to remove scan findings.

<a href="/en/">
  <img src="/images/logo.svg" width="160" alt="">
  Accesserty home
</a>

The expected link name is still “Accesserty home,” now supplied by visible text. Inspect the whole link’s name rather than only the image’s alt attribute, then use a screen reader to check that the purpose remains clear without duplication.

How to check your alt text on the page

Put the two logo examples above on a test page you can edit, using your own image path, site name and home URL. Test the rendered links, not the text in the code blocks. The expected name below is “Accesserty home”; if you change the site name, compare against your chosen home-link name instead.

  • In Chrome or Firefox, open the test page and choose Review → Image alt overview in DevCheck. The first logo should have “Accesserty home”; the second should have empty alt because equivalent text already names the link. This tool inspects the current page, not the whole site. Empty alt still needs a context check.
  • Next choose Accessible names (hover or Tab) and focus each link. Inspect the whole link’s accessible name: the text assistive technology uses to identify it. Both should be named “Accesserty home”, without duplication. Also confirm that the name describes the link’s actual destination.
  • Then check with a real screen reader. On a Mac, open the same test page in Safari and press Command + F5 to start VoiceOver. Press Control + Option + U for the rotor, use Left or Right Arrow to choose Links, then Up or Down Arrow to select an example and Return to move to it. This moves within the page; it does not activate the link.
  • Listen for a clear “Accesserty home” name on both links, without repeating it on the second. Role announcements, language and verbosity settings can change the extra words spoken. If the first link has no useful name, add purpose-based alt. If the second repeats the name, confirm the visible text is sufficient, set the image’s alt attribute to an empty string (alt=""), and test again.
  • Record the page URL, browser and screen reader versions, and the before-and-after result. If VoiceOver was off before testing, press Command + F5 to turn it off afterwards. DevCheck’s Reading preview is only an approximation, not a replacement for this test. Checking these examples does not establish page-wide or site-wide accessibility conformance.

What to check when using AI suggestions

DevCheck can help generate image alternative-text suggestions, but AI does not fully know the image’s role on your page. Before using a suggestion, check whether it captures the point, over-describes, misses the action purpose, or uses the wrong tone.

AI is optional. When you start it, DevCheck sends a bounded sample of page text, link names and surrounding text, plus selected readable images and naming context to Google Gemini—not just the image you are looking at. URLs within sampled content are not automatically redacted. Avoid sending confidential, personal or unauthorized information. Local scans and manual review remain available without AI. The “Before using AI, check where your data goes” link below explains the recipients and processing.

Do not turn alt text into a fixed formula

Alt text does not have one correct length or format for every image. A more reliable question is: if users cannot see the image, what information needed for the task would they lose? If the answer is nothing, the image may be decorative. If the answer is product difference, action purpose, chart conclusion, or important text, the alt text should fill that gap.

Next checks in this workflow

Choose a follow-up task that applies to your page. PDF checks are needed only when documents are part of the task; a fix still needs retesting.

  1. Review color, states, and readability

    Color contrast checks before release

    Review text, focus, error, and selected states, distinguishing essential icons and boundaries from decoration and genuinely inactive-control exceptions.

  2. Turn findings into a remediation plan

    Web accessibility remediation plan

    Organize next steps by user task, impact scope, owner, repair level, and re-test method.

Related pages