Skip to content

A11Y002: icon-button-without-text

Clickable button or icon without text or tooltip

Code A11Y002
Name icon-button-without-text
Category Accessibility (A11Y)
Default severity warning
Enabled by default no
Fix available no
ign-lint equivalent none

Reports a Button (ia.input.button) or Icon (ia.display.icon) that has an enabled event action but neither a visible text (props.text, buttons only) nor a tooltip text (meta.tooltip.text). Bound texts count as present.

A control that shows only an icon has no accessible name: screen readers announce "button", and operators unfamiliar with the icon have nothing to go by. A tooltip text or a short label fixes both.

{"type": "ia.input.button", "meta": {"name": "Reset"},
"props": {"text": "", "image": {"icon": {"path": "material/refresh"}}},
"events": {"component": {"onActionPerformed": {"type": "script", "config": {"script": "\treset()"}}}}}

Use instead:

{"type": "ia.input.button", "meta": {"name": "Reset", "tooltip": {"enabled": true, "text": "Reset counters"}},
"props": {"text": "", "image": {"icon": {"path": "material/refresh"}}},
"events": {"component": {"onActionPerformed": {"type": "script", "config": {"script": "\treset()"}}}}}

Not in the default set: many HMIs use well-known icon-only controls on purpose.


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