reala11y GUIDES How to WriteEffective Alt Textin WordPress Apr 14, 2020

April 14, 2020 · reala11y team

How to Write Effective Alt Text in WordPress

A practical guide to alt text in WordPress: what to include, decorative vs meaningful images, when to use empty alt, and the common mistakes to avoid.

Alt text is the single most common accessibility issue automated scanners flag, and one of the few that authors can almost always fix themselves. It is also widely misunderstood. WordPress puts an Alternative Text field on every image in the Media Library and the block editor, but a field is not guidance, and a lot of well-meaning alt text actively makes pages worse.

This is the practical version: what to write, when to write nothing, and the mistakes that show up most often.

What alt text is actually for

Alt text (WCAG Success Criterion 1.1.1, Non-text Content) is the text alternative a screen reader announces in place of an image. It also surfaces when an image fails to load and feeds search crawlers. The job is to convey the image’s purpose in context — not to describe every pixel.

The same photo can need completely different alt text depending on where it sits:

Context decides the words. That is why no tool — ours included — can write perfect alt text unattended; it can draft, but a human confirms intent.

Decorative vs meaningful images

Before writing anything, decide which kind of image you have.

Meaningful images carry information the surrounding text does not: charts, diagrams, product photos, screenshots, photos of people the article is about. These get descriptive alt text.

Decorative images add visual texture but no information: background flourishes, divider lines, a generic stock photo of a laptop next to a paragraph that already says everything. These should have an empty alt attribute so assistive technology skips them.

A useful test: if you read the page aloud and the image’s content is already covered by nearby text — or the image is purely ornamental — it is decorative.

When to use empty alt

Empty alt means alt="" — the attribute is present but deliberately blank:

<img src="divider.svg" alt="">

This tells a screen reader “skip this, it’s decorative.” It is not the same as omitting alt entirely. A missing attribute makes some screen readers read out the file name (IMG_4821.jpg), which is noise. In WordPress, leave the Alternative Text field blank for decorative images, but make sure your theme or blocks still emit alt="" rather than dropping the attribute.

reala11y flags images that are missing the alt attribute and treats a present-but-empty alt as a deliberate decorative choice — it does not nag you to fill it in. See our WCAG 2.2 guide for how 1.1.1 fits the wider rule set.

What to include in good alt text

For meaningful images:

Common mistakes

These are the patterns that come up again and again in real WordPress sites:

That last point matters: passing an automated check is not the same as being understood. Automated tooling typically detects only 30–40% of WCAG issues by criteria — it can tell you an alt is missing, but it cannot judge whether the words you wrote are right. That judgment is human.

How reala11y helps

reala11y is a code-level tool, not an overlay widget — it fixes the underlying HTML rather than layering JavaScript over it. For alt text specifically it:

See how it works for the full scan-and-fix flow.

The honest takeaway

Good alt text is a writing task, not a checkbox. A scanner can find the gaps and a draft can save you keystrokes, but only you know what each image is for. Write for the reader who can’t see it, mark the decorative ones empty, and treat any tool’s output — ours included — as a starting point to review, never a finished answer.