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 |
What it does
Section titled “What it does”Reports an Image component (ia.display.image) whose props.altText is
missing or blank and not bound.
Why is this bad?
Section titled “Why is this bad?”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).
Example
Section titled “Example”{"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.