Icons should clarify meaning, not replace essential text labels for critical actions.
Icon usage rules
- Pair icons with text for primary actions.
- Keep size and stroke consistent across system.
- Use accessible names for icon-only controls.
A11y warning
Icon-only buttons without labels create ambiguity for screen readers and new users.
Important interview questions and answers
- Q: SVG icon vs icon font?
A: SVG is generally more flexible, accessible, and predictable. - Q: How should icon-only buttons be labeled?
A: Provide an accessible name (for example witharia-label). - Q: Why avoid decorative icon overload?
A: It adds noise and weakens visual hierarchy.
Pitfall: Check cascade order—author stylesheet loses to inline styles and !important surprises.