Skip to content

A11Y001: image-without-alt

Image component without alternative text

Code A11Y001
Name image-without-alt
Category Accessibility (A11Y)
Default severity warning
Enabled by default yes
Fix available no
ign-lint equivalent none

Reports an Image component (ia.display.image) whose props.altText is missing or blank and not bound.

altText becomes the image's alt attribute. Screen readers announce an image without it by its file name, and nothing is shown when the source fails to load (a missing image or a broken URL on a remote screen leaves an empty box).

{"type": "ia.display.image", "meta": {"name": "Logo"}, "props": {"source": "/system/images/logo.png"}}

Use instead:

{"type": "ia.display.image", "meta": {"name": "Logo"}, "props": {"source": "/system/images/logo.png", "altText": "Company logo"}}

Generated from the rule metadata by iglint generate-docs; iglint rule A11Y001 prints the same page in the terminal. Source: docs/rules/A11Y001.md.