WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Use of hyperlinks instead of buttons

for

From: Lovely, Brian (CONT)
Date: Jun 29, 2016 7:06AM


Looking forward to that Birkir!

Technically, using a link as a button without providing a role attribute of "button" fails the "role can be programmatically determined" part of WCAG criteria 4.1.2. In a situation where you are trying to get designers and developers to think about the semantic meaning of HTML elements, it doesn't hurt to point out that a link styled to look like a button will never be as much of a button as...wait for it...a button. There are more egregious violations of Name, Role, Value, for instance anything but a heading styled and used like a heading, spans and divs tricked out as links and/or buttons with CSS and JavaScript, a group of divs or spans styled and used like a list.

Sometimes you do need to pick your battles. I'd go after links that violate 1.1.1 Non-text content or 2.4.9 Link Purpose before I'd go after faux buttons.


Brian Lovely
Digital Accessibility Team
<EMAIL REMOVED>