a11yphant Homepage

Buttons vs. Links - Level 05

Buttons vs. Links

Instructions

Developers tend to use the HTML element that most closely matches the screen design. For example, if a landing page has a call-to-action button that sends the user to another page, many developers might use a <button>. However, the action performed is actually a navigation, which means an <a> element should be used.

Users with impairments might rely on assistive technology, like a screen reader, that reads the markup and announces it to them. When a button is announced, the user expects the button to behave like a button. It can confuse the user if the button suddenly sends them to a different page.

So it's very important to base the element you use on the behavior, not on the styling.

Fix the HTML markup in the editor but keep the functionality of each element.

index.html

On your computer: Press + m to use the tab key for site navigation.

The editor is loading...

Preview