After years of arguing for proper use of form elements and link elements, others are finally doing the same. More recently, this includes the articles The Anchor Button: Bad for Accessibility, Bad for Usability by Matt Long and Reinventing the hyperlink (with much humor!) by Heydon Pickering.
The main point is, please do the basics. When designing a website, ensure controls with button-type behavior (interaction, affects the current page) are designed as buttons and regular text links (go to an external page, anchor on page, or external document) are designed like text links (such as blue underlined text).
When developing a website, ensure buttons are coded as buttons (the button or input element) and links are coded as links (the anchor element).
Here are some reasons why it’s so important:
- accessibility and usability
- a more robust website (support older user agents, non-JS, etc.)
- lighter and less complex code
- more consistent implementation so easier to maintain
Remember that for accessibility, no matter how much ARIA and trickery is done, there will mostly likely still be problems. When blurring the distinction between a button and a link, assistive technology (and/or the user) can be confused as to what’s what. View the beginning of this presentation by Derek Featherstone for a good example of this.
This advice sounds simple, but this elementary guideline is broken quite often; once you start to look, you’ll find it everywhere on the web, especially web apps. There’s no need to create confusion (the design) and to re-invent the wheel (the development). Sticking to the basics will make it easier for everyone, most importantly the user.
For an example of proper implementation, check out Easy Chirp.
- What ARIA does not do by Steve Faulkner (Aug. 2014)
- The Enter Key should Submit Forms, Stop Suppressing it by TJ VanToll (Jan. 2013)
- HTML5 Accessibility Chops: the placeholder attribute by Steve Faulkner (2011, updated 2013)
- You can’t create a button by Nicholas Zakas (Jan. 2013)
- Placeholder Attribute Is Not A Label! (June 2012)
- “Don’t hide your affordances under a bushel” p151 of Don’t Make Me Think Revisited by Steve Krug
- ADDED: How Our CSS Framework Helps Enforce Accessibility by Ian McBurnie—uses button (and tabs) as examples
- ADDED: Links, Buttons, Submits, and Divs, Oh Hell by @aardrian
- ADDED: When To Use The Button Element by CSS-Tricks
- ADDED: But sometimes links look like buttons by Adam Silver