Is it OK to have a link that looks like a button?

Question

I come across a long of links that look like buttons. Is this OK from an accessibility standpoint? 

Answer

Yes, it is OK to use links that look like buttons, but it is highly encouraged to use the native elements if possible.

If necessary you can have links that look like buttons and you can even do the opposite and make link elements function as buttons.

If you are using an anchor element (<a href=”URL”>), you do not need to do anything other than provide an aria-label if there isn’t text within the link element. If you are using a <button> element, that element will need to have the role=”link” attribute so that assistive technologies know that the element functions as a link and not a button.

As noted above it is still a best practice to use native elements as often and consistently as possible and to keep formatting in line with the roles each of these different component have. For example with  links having the link text underlined, and a different color. For buttons having them contained within a button UI component.

 

Free Tools to Continue Learning

Accessible Web Company Logo

Accessible Web RAMP

Monitor your website and manage your progress towards WCAG conformance.

Accessible Web Company Logo

Accessible Web Academy

Career specific courses to help power up your accessibility knowledge.