Every HTML element has its purpose.
A button performs an action, while a link takes you somewhere else. A link points to a different location, defined by the href attribute. A button, on the other hand, triggers a specific action, such as submitting a form or opening a menu or modal window.
Both buttons and links can be selected using the keyboard and activated with the Enter key. The button can also be activated with the spacebar.
If you create your own elements using a div tag, neither focus nor keyboard mapping will work automatically. Correct, accessible behavior must be programmed manually. There are many potential sources of error, so it’s advisable to use the predefined elements rather than creating them yourself.

Screen readers handle buttons and links differently.
Screen readers create separate lists for buttons and links in the background to improve navigation. This allows users with screen readers to navigate quickly and efficiently between elements such as buttons and links. The separate list for buttons allows them to select and actively use interactive elements like buttons. The list for links, on the other hand, provides an organized overview of the available navigation links. This structured approach makes it easier for users to navigate the website and interact more efficiently.
Problems that arise when you confuse links and buttons.
Confusing buttons and links negatively impact your website’s accessibility. Buttons and links not only have subtle differences but also serve different purposes. Using them incorrectly can impair usability for certain user groups.
Link instead of a button
Several problems can arise when a link is used instead of a button. These unintended consequences are manifold:
- The element does not function as expected: Instead of triggering an action, the “link” takes the user to a new page. This can lead to confusion and frustration, as users expected a specific function that is not fulfilled.
- The “link” is displayed in the wrong list: Screen readers recognize the element as a link because it is marked with <a> tag. As a result, the link appears in the list of links instead of the list of available actions. This can make navigation difficult for users with visual impairments.
- Empty value for the href attribute: If the href attribute of the <a> element is empty, the element loses focus as soon as it is triggered. This prevents keyboard users from reusing the link without first having to navigate to another element.
Button instead of a link
Similar problems can occur if a button is used instead of a link:
- The element is not behaving as expected: Instead of taking the user to another page, the “button” triggers an action. This can lead to confusion, as users may have expected to be taken to a different page.
- The “button” is displayed in the wrong list because the <button> element is not marked as a link; screen readers display it in the list of available actions.
- Difficulties when using screen readers: People who rely on screen readers may have difficulty finding and activating the button if it is not marked as a link.
Conclusion
Overall, it’s important to choose the right combination of buttons and links to ensure an accessible and user-friendly website. Buttons and links serve different functions. If they are mixed up, problems with operation and navigation can arise.