Accessible Buttons vs Links: Which to Use

Mobile & Accessibility2 min readBy the Monopage team

It looks like a small design detail, but whether you use a link or a button affects how assistive technology describes your page and how keyboard users operate it. The rule is simple and worth learning.

The core rule

  • Use a link (a with an href) when the action takes the visitor to another page, another place on the page, or a file
  • Use a button (button) when the action does something on the current page: submit a form, open a menu, toggle a panel, play a video, add to cart

Screen reader users hear different announcements for each ("link" vs "button") and use different shortcuts to list them. The word tells them what to expect.

Why native elements matter

Native links and buttons come with behavior for free:

  • They can receive keyboard focus
  • Enter activates a link, and Enter or Space activates a button
  • They are exposed to assistive technology with the correct role
  • They work in browsers' accessibility features and voice control

A div or span styled to look like a button has none of this. You would need to add a role, make it focusable, and handle both keys yourself, which is easy to get wrong. If you can use the native element, do.

Common problems

  1. Links with no destination. An a without href, or href="#" used to run a script, is not a real link and is not keyboard focusable.
  2. Buttons that navigate. A button that goes to another page without being a link breaks expectations, such as opening in a new tab.
  3. Vague names. "Click here" and "Read more" tell a screen reader user nothing when listed out of context. See how to write calls to action and microcopy for buttons and forms.
  4. Icon-only controls with no name. See accessible icons and icon buttons.
  5. Links that look like plain text. Links in body copy need more than color to stand out, such as an underline. See color blindness and web design.

Styling

You can style links to look like buttons and buttons to look like links, but the underlying meaning should stay accurate. A "Get a quote" link styled as a button is fine if it leads to the quote page. See button design best practices.

Size and spacing

Make targets large enough and spaced apart. WCAG 2.2 sets a minimum target size of 24 by 24 CSS pixels with some exceptions, and larger is friendlier. See touch target sizes for mobile.

States and feedback

Show clear hover, focus, active, and disabled states. Explain why something is disabled rather than silently blocking it. See accessible focus styles.

Opening in a new tab

Warn people when a link opens a new window, in text or with an accessible indicator, because it can be disorienting.

Test it

Press Tab and Enter and Space on each control. Open a screen reader's list of links and buttons and check that each makes sense out of context. See how to test with a screen reader.

Common mistakes

  • Clickable divs
  • href="#" links
  • Using the wrong element because of how it looks

Icons are often used inside buttons. Read accessible icons and icon buttons.