- Is it OK to have a link that looks like a button?
- Should links be underlined for accessibility?
- Do buttons need to be accessible?
Is it OK to have a link that looks like a button?
This is considered bad practice because it makes it unclear as to the user's intent. Links are supposed to navigate the user to another part of the webpage or an external site. And buttons are supposed to perform a specific action like submitting a form.
Should links be underlined for accessibility?
Best practice is to underline all links in content. However, if your links are not underlined, web accessibility guidelines (WCAG 2.0) require link text be discernable from body text by at least a 3:1 contrast ratio.
Do buttons need to be accessible?
Buttons should always have an accessible name. For most buttons, this name will be the same as the text inside the button, between the opening and closing tags. In some cases, for example buttons represented by icons, the accessible name may be provided from the aria-label or aria-labelledby attributes.