unDraw for Websites

How to Write Alt Text for unDraw Illustrations

How to write alt text for unDraw illustrations: when an illustration is informative or decorative, what to describe, what to leave out, and examples for common scenes.

A speech bubble beside an illustration, showing the short description a screen reader would announce

Every illustration on a web page needs a decision about its text alternative, and unDraw artwork is no exception. The right unDraw illustration alt text might be a full sentence, a few words, or a deliberately empty attribute, and the correct answer depends on the job the illustration does on that specific page. This guide follows the approach published by the W3C Web Accessibility Initiative: work out the purpose of the image first, then write only what that purpose requires. You will find a simple decision process, the common mistakes, and worked examples for the scenes unDraw is most often used for.

Why alt text exists

A text alternative is the version of the image that travels when the image cannot. Screen readers read it aloud to people who cannot see the page. Voice control software uses it to name things on screen. Browsers show it when the file fails to load, and search engines read it to understand what the image shows. Writing it well is not a search trick and not a caption. It is the same information, offered in words, so that the page makes sense with the pictures turned off.

That framing settles most arguments. Ask what a visitor would miss if this illustration vanished, and write that. If the honest answer is nothing, because the picture only makes the page prettier, the correct alternative is an empty one.

Step 1: decide the illustration's job

The W3C Web Accessibility Initiative groups images by purpose in its Images Tutorial, and the grouping maps neatly onto how unDraw artwork gets used:

  • Informative. The illustration adds meaning: it shows the activity, concept, or mood the text is talking about, in a way the text alone does not fully capture. Most in article unDraw scenes are this type. Give it a short description that conveys the essential information.
  • Decorative. The illustration is visual seasoning beside text that already says everything. Many hero and section header scenes fall here, especially when a heading next to the artwork names the topic. Give it an empty alt attribute, alt="", so assistive technology passes over it in silence.
  • Functional. The illustration is a link or a button. Then the alternative must describe the destination or the action, not the picture. An illustration card that links to a guide should be named by where it goes.
  • Images of text. If words are baked into the artwork and those words matter, the alternative must include them. Better still, put the words in real text and treat the image as decorative.
  • Complex. If an illustration presents a chart like diagram or detailed data, a one line alternative cannot carry it. Summarize briefly in the alt and provide the full information in the surrounding text.

The Initiative's alt Decision Tree asks these questions in order: does the image contain text, is it used in a link, does it contribute meaning, is it purely decorative. Walking those four questions for each illustration takes seconds once it becomes a habit, and it prevents the two real errors: describing decoration at length, and silencing an image that carries meaning.

Step 2: write the description

For an informative illustration, describe the meaning, not the inventory. A scene of two people at a desk with a laptop, a plant, a coffee cup, a wall clock, and three charts does not need all seven objects named. It needs the idea the page is using it for: a team reviewing results, a freelancer starting a project, a student studying. The surrounding text tells you which reading is right, because the same unDraw scene can illustrate a section about teamwork on one page and a section about remote work on another, and the honest alt text differs between them.

A few craft rules cover most cases:

  • Keep it short. One sentence is usually enough for an illustration; if you are writing a paragraph, the image is probably complex and the detail belongs in the body text.
  • Do not start with "image of" or "illustration of". The screen reader already announces that it is an image.
  • Do not repeat the heading or the sentence next to the picture. Duplicated content read aloud twice helps no one, and it is the surest sign the image should have been marked decorative.
  • Do not stuff keywords. Alt text written for search engines reads badly aloud and serves neither audience.
  • Skip the file name and the credit. Attribution is not required by the unDraw license, and alt text is the wrong place for it regardless.
  • End with a period if the alternative is a full sentence, so screen readers pause naturally.

Examples for common unDraw scenes

SituationAlt textReasoning
Team scene beside a "How we work" heading and a full paragraphalt=""The text already carries the meaning; the scene is decoration
Same team scene as the only visual in a section about collaboration habits"Two colleagues discussing a chart together at a desk."It now contributes the idea, so it earns a description
Illustration on a card that links to a pricing page"See plans and pricing"Functional image: name the destination, not the drawing
Empty state illustration in an app, above the words "No projects yet"alt=""The words beside it say everything; the scene sets a mood
Step by step process illustration in a tutorial"A person completing the three setup steps in order."Informative, and the steps themselves are detailed in the text
404 page illustration of a character with a mapalt=""The error message is real text; the character is a friendly decoration

Notice how often the empty alternative wins. That is normal for illustration libraries. unDraw scenes are usually chosen to warm up a page whose text already does the explaining, and marking those scenes decorative is not laziness. It is the decision that gives screen reader users the cleanest experience, sparing them a poetic description of artwork that adds nothing to their understanding. Our guide to building a 404 page with an unDraw illustration uses exactly this pattern: the message is text, the character is decoration.

Empty alt is a choice, not an omission

There is a technical difference that matters. An img element with alt="" is a deliberate statement that the image is decorative, and assistive technology will skip it. An img element with no alt attribute at all is an unknown, and some screen readers fall back to reading the file name, which is how a visitor ends up hearing a long download file name read aloud in the middle of your article. Always write the attribute; make it empty on purpose when that is the decision. The same applies in WordPress, where the alt field can be cleared deliberately, as covered in our unDraw PNG WordPress guide.

Inline SVG follows the same logic with different mechanics. A meaningful inline illustration gets role="img" and a <title> inside the SVG; a decorative one gets aria-hidden="true" and no title. The code patterns are shown in our guide to adding an unDraw SVG to HTML.

Reviewing alt text you have already written

A fast audit needs no tools. Read each page with the images mentally removed and check three things. First, does anything important go missing? If yes, that image needs a real alternative. Second, does anything get said twice? If a description merely echoes the heading, empty it. Third, does any alternative describe the wrong thing, for example naming a destination incorrectly on a linked card? Fix that one immediately, because a wrong label is worse than none.

Revisit the decisions when you reuse an illustration in a new context. The scene did not change, but its job may have, and unDraw illustration alt text is a property of the placement, not of the file. Teams that keep a small note beside each asset in their library, recording where it is used and why, find this review takes minutes. Our guide to organizing unDraw illustration files suggests a simple way to keep those notes.

Alt text is one of three different fields

Content systems and social platforms surround an image with several text fields, and mixing them up produces some of the strangest alt text on the web. The alt text is the replacement for the image, written for people who cannot see it, and it is the subject of this guide. A caption is visible text printed under the image for everyone; it can add context, credit a source, or make a joke, and screen readers treat it as ordinary page text, which is why repeating the alt text as a caption reads twice. The title field in a media library is an internal label for whoever manages the library later. Search engines and assistive technology largely ignore it. Write each field for its own audience: findable labels in the title, visible value in the caption, and a faithful replacement in the alt.

Sharing previews are a separate mechanism again. The image and description that appear when a page is shared come from the page's social meta tags, not from alt attributes, so time spent polishing alt text does nothing for a share card, and a good share description is usually far too promotional to serve as alt text.

Groups of illustrations

Pages often place several scenes together: a row of three feature illustrations, a before and after pair, a gallery. The W3C tutorial treats a group that conveys a single piece of information as its own case. One image in the group carries the alternative for the whole set, and the others take empty alt attributes, so the listener hears the idea once, cleanly, instead of three partial descriptions in a row. A features row is the classic example: if each illustration sits under its own heading and paragraph, each is decorative beside its own text and all three can be empty. If the row itself is the content, with no explanatory text, describe the set once on the first image, or better, add the missing text for everyone's benefit.

Phrases that signal a rewrite

  • "Image of", "picture of", "illustration of". The technology announces the format. Start with the content.
  • The file name wearing a trench coat. Alternatives like "undraw team work purple" are keywords in a row, not a description a person would say aloud.
  • The heading, repeated. If the alt text and the heading could swap places without changing the page, one of them is redundant, and it is the alt text that should go empty.
  • Instructions to the eye. "See the chart on the left" fails anyone who cannot see left, and dates badly when the layout stacks on mobile. Describe the information, not its position.
  • Every object in the scene. A furniture inventory of the drawing. Keep the subject and the action; the plant in the corner has never once mattered.

Frequently asked questions

Should every illustration have descriptive alt text just in case?

No. Describing decoration adds noise for the people alt text exists to help. Decide the image's job and follow the decision.

Does alt text help my search rankings?

Accurate alt text helps search engines understand an image, which the W3C notes as a side benefit. It is not a place for keyword lists, and writing for the screen reader produces the text search engines prefer anyway.

What about the title attribute?

It is not a substitute. Support for it is inconsistent, it is unavailable to many keyboard and touch users, and anything important belongs in the alt text or in visible text.

How long is too long?

There is no official character limit. As a working rule, if the alternative passes two sentences, ask whether the detail belongs in the body text instead, with a short summary left in the alt.

Sources and further reading