inappropriate-alt
Rule Severity : Serious
Description
Non-decorative images must have meaningful alt
text that accurately describes the purpose or content of the image. Users with visual impairments depend on screen readers to interpret images. If the alt
text of an image is misleading, vague, or lacks essential details, it fails to provide necessary information to the user.
Examples
In the following example, the alt
text does not accurately describe the image, which may result in a loss of context and information.
In the following corrected example, the alt
text provides better context and gives a more meaningful description of the image.
How to fix?
- Ensure the
alt
text accurately describes the purpose of the image. - If the image is purely decorative, use
alt=""
orrole="presentation"
. Decorative images are those that can be removed from a page without any loss of information. - Avoid vague or misleading descriptions.
- Avoid using generic phrases, like “image”, “img”, “graph”, or “pic”, as alternative texts.
References
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!