Button and Link
Buttons trigger actions while links navigate to resources or locations, so their behavior and semantics should match the outcome users expect.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/button-and-link/
01What it means
A button is an interactive control that performs an action, such as saving data, changing a state, or opening a dialog. A link is a reference that takes the user to another resource or location. Visual styling does not determine the distinction: destination-changing behavior is a link, while an in-place command is a button.[1][2]
02Why it matters
Correct controls give people reliable keyboard behavior, context-menu options, browser history, and assistive-technology announcements. A mismatch between appearance, semantics, and outcome makes interfaces harder to predict and operate.
03When to use it
Use a button for commands and state changes, and a link for navigation with a meaningful destination. Use a toggle control for a persistent binary setting, and avoid making a generic container clickable when a native button or link expresses the behavior.
04How it works
- Describe the outcome of activation before choosing the control.
- Use a native button for an action and a native link with a valid destination for navigation.
- Write a concise label that names the action or destination rather than the component type.
- Provide visible focus, appropriate disabled or busy behavior, and a sufficiently large target.
- Test activation, focus movement, browser conventions, and announcements with keyboard and assistive technology.
05A practical example
A billing page uses a link labeled “View invoices” to open invoice history and a button labeled “Update card” to submit changed payment details. Opening the link in a new tab works normally, while the button validates the form and reports its result without changing destinations.
06Where it breaks
The action-versus-navigation rule does not decide hierarchy, placement, or visual emphasis. Single-page applications can blur URL changes and local state, so teams must still preserve meaningful destinations, history, and focus behavior.
Common mistakes
- Using a link styled as a button to submit or mutate data.
- Using a button for navigation and removing link behaviors such as opening in a new tab.
- Giving icon-only controls no accessible name.
- Disabling a control without explaining how it can become available.