Skip to content
Clairos Learn

Accessibility · Lesson 2 of 8 · 7 minutes

Accessibility: Image alternatives

Write alt text for the image purpose in this context, not every visual detail. Decorative images use alt="".

Mastery 0/3Run itExplain itApply it
Web workshopInert preview · code inspection

Current edit

PreviewNo external resources

Understand the pattern

Write alt text for the image purpose in this context, not every visual detail. Decorative images use alt="".

Write alt text for the image purpose in this context, not every visual detail. Decorative images use alt="".

Misconceptions to reject

  • A visual appearance alone guarantees the intended HTML meaning.
  • Replacing semantic elements with generic divs automatically improves accessibility.

The preview is a sanitized subset, not a full browser compatibility test.

Worked example and expected result
<figure><img src="entrance.png" alt="Step-free entrance on the east side"><figcaption>Workshop entrance.</figcaption></figure><img src="flourish.svg" alt="">

Write alt text for the image purpose in this context, not every visual detail. Decorative images use alt="".

Try a variation

Adapt the final example to a different project name while retaining its structure and relationships. A different context still needs a real browser and accessibility check.

Explain it

Which statement correctly explains image alternatives?

Apply it elsewhere

You reuse image alternatives in a different project. What must still be verified?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Accessibility: Landmark labelsTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Accessibility: Accessible namesVisible text usually gives a native button its accessible name. Icon-only controls need an equivalent name.Practice
  2. 02Accessibility: Landmark labelsDistinct names help people differentiate multiple navigation landmarks.Practice
  3. 03Accessibility: Keyboard orderNative links and buttons participate in keyboard navigation in source order. Positive tabindex usually creates surprising jumps.Practice