# Button and Link

Buttons trigger actions while links navigate to resources or locations, so their behavior and semantics should match the outcome users expect.

- Type: framework
- Domain: Experience & interface
- Level: Foundational
- Last reviewed: 2026-10-06
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/button-and-link/>)

## What 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.

## Why 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.

## When 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.

## How it works

1. Describe the outcome of activation before choosing the control.
2. Use a native button for an action and a native link with a valid destination for navigation.
3. Write a concise label that names the action or destination rather than the component type.
4. Provide visible focus, appropriate disabled or busy behavior, and a sufficiently large target.
5. Test activation, focus movement, browser conventions, and announcements with keyboard and assistive technology.

## A 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.

## Where 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.

## Sources

1. [Button Pattern](<https://www.w3.org/WAI/ARIA/apg/patterns/button/>) — W3C Web Accessibility Initiative · Technical guidance
2. [Link Pattern](<https://www.w3.org/WAI/ARIA/apg/patterns/link/>) — W3C Web Accessibility Initiative · Technical guidance

## Related topics

- [Interaction State](<https://wiki.soroush.uk/topic/interaction-state/>)
- [Accessible Name](<https://wiki.soroush.uk/topic/accessible-name/>)
- [Modal Dialog](<https://wiki.soroush.uk/topic/modal-dialog/>)
