Alt text is the short textual alternative attached to an image. It helps people using screen readers understand meaningful visuals and gives context when an image cannot be displayed. Good alt text is not a place to repeat keywords; it should communicate the image's purpose in the surrounding page.
Identify the image's role
Ask what a reader would miss if the image disappeared. For a product photo, identify the product and any distinguishing feature relevant to the page. For a chart, summarise the takeaway or provide the underlying data nearby. Avoid beginning every description with 'image of' unless that wording genuinely helps.
Read the result aloud or test it with the interface you use. The question is whether the description makes the page easier to understand, not whether it contains a particular number of words.
Write alt text that adds context
Decorative flourishes that add no information should usually use an empty alt attribute so assistive technology can skip them. An image that acts as a link needs a description of the destination or action, not merely its appearance. The surrounding text matters: do not repeat a caption word for word when it already communicates the same information.
Read the result aloud or test it with the interface you use. The question is whether the description makes the page easier to understand, not whether it contains a particular number of words.
When an empty alt attribute is correct
Keyword stuffing makes descriptions awkward and can make a page harder to use. Keep the wording concise, specific and natural. If a complex diagram needs a longer explanation, put the full explanation in the page text and use alt text to identify the diagram and its purpose.
Read the result aloud or test it with the interface you use. The question is whether the description makes the page easier to understand, not whether it contains a particular number of words.
Common mistakes to avoid
During publishing, check the image at the point where it appears. Confirm that the alt text matches the current crop, that decorative images are not announced unnecessarily, and that important information is available in text rather than encoded only in colour or pixels.
Read the result aloud or test it with the interface you use. The question is whether the description makes the page easier to understand, not whether it contains a particular number of words.
A practical example
For example, a page showing three laptop ports should identify the relevant ports or explain the connection difference the image illustrates. A decorative gradient behind the heading does not need a spoken description. This contrast keeps the page informative without adding noise.
Write down the intended outcome before making a change, then test a representative case from start to finish. If the task affects other people, ask someone unfamiliar with the workflow to review the result. Fresh eyes often reveal unclear wording, unexpected permissions or interface details that the person who built the page no longer notices.
Common pitfalls to avoid
A frequent mistake is writing alt text from the filename or repeating a list of keywords. Another is leaving informative images unnamed while giving decorative shapes verbose descriptions. Review meaning and context rather than aiming for a fixed character count.
Keep a source copy and document any change that is difficult to reverse. When a result matters, use the relevant official documentation and verify the final output independently. Practical guides can help structure the work, but the correct settings may vary by browser, device, platform and local requirements.
Final checklist
- Define the task and check the current source material.
- Use a practical workflow that matches the audience and device.
- Review quality, accessibility, privacy and performance where relevant.
- Test the final result instead of assuming the first output is correct.
- Keep notes on important changes so the process can be repeated.
Frequently Asked Questions
Should every image have descriptive alt text?
Meaningful images should have useful alternatives. Purely decorative images can usually use an empty alt attribute so screen readers skip them.
How can I check that the result is correct?
Review the finished result in the real context where it will be used, check for errors, and repeat the process with a representative example before relying on it for an important task.
Does this guide replace professional advice?
No. It offers general practical guidance. Follow the relevant platform documentation, organisational policies and professional advice where the task has legal, security or accessibility implications.