Web Accessibility - Button vs. Link ??

Web Accessibility - Button vs. Link ??

<button> element at MDN Web Docs

<a> element at MDN Web Docs

Probably one of THE issues when it comes to (in)accessible websites: When do I use a button and when a link? Is it ok for a button to look like a link and vice versa?

The answer to the first question is: A link takes you somewhere, a button does something. Or to put it differently:

  • Link = Navigation
  • Button = Action

Here is a real world example on how to confuse developers quite easily, because it is not clear whether one wanted to use a link or a button. Or rather a link with the functionality of a button. Or is it supposed to be the other way round?

Showing an HTML a element used as a button

The other example is from a popular tutorial website, showing how to use a button as a link:

Showing an HTML button element used as a link

I mean, one could just use an <a> element to get the job done but then it wouldn't look and feel like a button, right? And there's just NO WAY to style a link like a button, RIGHT? If you are interested in this topic, you can find a detailed article about designing buttons and links here:

A Complete Guide to Links and Buttons

Answer number two is: No. Buttons and links should be clearly distinguishable from each other. A button is usually characterized by the fact that the text describing the function is completely outlined. Links, on the other hand, stand out mainly because of their simplicity and the underline. They're also coming with different functionality and are interpreted differently by screen readers, which is way it's even more important to use the correct element.

Nevertheless, there are countless websites where buttons look like links (or vice versa) or even underscores are removed from links. Why? Probably because it is supposed to look good. In any case, it makes it difficult for the user to identify a link as easily as possible. In case you don't know what to use, here's a quote from me:

A link takes you somewhere, a button does something. Or to put it differently:
Link = Navigation
Button = Action

要查看或添加评论,请登录

?? Steve Frenzel的更多文章

  • GAAD - Today is the day! ??

    GAAD - Today is the day! ??

    For all people involved in making the internet a little bit more inclusive, today is an important day: Global…

  • How to find your way with WCAG 2.1 Map ??

    How to find your way with WCAG 2.1 Map ??

    You have to remember so many things in life: What's my PayPal password? (I personally don't know mine, am my biggest…

    2 条评论
  • Create inclusive designs with Stark

    Create inclusive designs with Stark

    As a developer, you often get design templates that are supposed to be implemented pixel-perfectly. Why this approach…

  • Kim Arnett: Why You, A Mobile Developer, Should Care About Accessibility

    Kim Arnett: Why You, A Mobile Developer, Should Care About Accessibility

    This article by Kim Arnett illustrates very well how important it is to test your website or app in the "real world"…

  • Do I have to be a developer to test accessibility? ??

    Do I have to be a developer to test accessibility? ??

    Nope. You don't have to be an expert to test basic accessibility aspects of a website.

  • Accessibility Myths DEBUNKED

    Accessibility Myths DEBUNKED

    This website by Sergei Kriger debunks the most popular myths about accessibility, most with a follow-up link to each…

    2 条评论
  • Nürnberg DIGITAL FESTIVAL

    Nürnberg DIGITAL FESTIVAL

    Link to my Web Accessibility talk On July 16 at 11am I will give a talk on web accessibility at the Nuremberg Digital…

    3 条评论
  • Web Accessibility - Every Layout

    Web Accessibility - Every Layout

    Creating accessible websites is not just about ONLY people with disabilities being able to use them, but ALSO people…

  • Web Accessibility - Inclusive Design at Microsoft

    Web Accessibility - Inclusive Design at Microsoft

    Inclusive Design at Microsoft Knowing when to use which semantic HTML element to create accessible websites is just one…

  • Web Accessibility - <nav> element

    Web Accessibility - <nav> element

社区洞察