Image alt text provides a text alternative when an image cannot be perceived in the usual way. The right wording depends on what the image does in the page, not just what objects appear in it.
Before writing, decide whether the image conveys information, performs an action, or is purely decorative.
Informative images need relevant information
For a photo used to show a workspace setup, “Laptop beside an open notebook on a desk” may be useful. Adding unrelated business keywords does not improve the description.
Focus on what matters in context. A product photo may need to identify the visible option or detail that distinguishes it from another image.
Avoid claiming information that the photo does not show, such as a person’s role or a business result.
Decorative images can use an empty alternative
If an image adds no information beyond nearby text and has no functional role, an empty alt attribute may be appropriate.
W3C’s alt decision tree helps distinguish these cases.
Do not omit the decision entirely. Missing alternative text and deliberately empty alternative text are not the same editorial choice.
Functional images describe the action
If an image is the only content of a link or button, its alternative should communicate the destination or action.
For example, a logo linking to the homepage should identify that function appropriately. “Blue shape” would describe its appearance but fail to explain its purpose.
Check the surrounding link text before adding redundant wording.
Screenshots may need more than alt text
A screenshot illustrating a settings screen can have a concise alternative identifying the relevant view. The essential instructions should also be written as usable text.
Do not force a long procedure into the alt attribute. Readers need an accessible explanation they can follow step by step.
For a chart, provide the meaningful conclusion and, where appropriate, a nearby data table or fuller description.
Compare examples
| Image role | Better approach |
|---|---|
| Photo illustrating notebook planning | Describe the visible relevant scene |
| Decorative background texture | Consider an empty alternative |
| Icon-only download link | Explain the download action |
| Screenshot of several settings | Identify the screen and explain the steps nearby |
| Sales chart | Provide the information needed to understand the data |
The same image can need different treatment in different contexts.
Keep filenames, captions and alt text distinct
A filename helps manage the asset. A caption adds visible context. Alt text supplies the appropriate alternative for the image’s role.
Do not paste the photographer credit into alt text when the credit belongs in a caption.
Google’s image guidance also discusses descriptive image information, but accessibility should not be reduced to keyword placement.
Review in the finished page
Read the text around the image and check whether the alternative adds the needed information without needless repetition.
When the page changes, review the image’s role again. Good alt text is a contextual editorial decision, not a label assigned once and forgotten.
