Closed Mike-Heneghan closed 4 years ago
Good article on anchors vs buttons.
I think the general takeaway from the above is that buttons and anchors are a grey area as they are often misused. Although we are suing links styled like buttons we still have the underline of a link so a visual suggestion this call to action styled as a button is actually a link.
In general, I think out buttons and some of our anchors are styled the same. There aren't any visual differences between them.
Although the anchor tags generally "navigate the user to a page or resource" and the buttons (and inputs) are used for forms and behaviour which doesn't navigate elsewhere.
For example:
Some places these rules do not apply are the actions on the service detail pages etc.
They are all styled as links although some navigate away and others open modals or reveal input fields.
Might be an opportunity to use the role
attribute.
Should links that open modals also navigate to them?
Associated issues closed
Currently, some HTML elements are not used for their intended function. Semantically buttons should be used but anchor tags can enable behaviour without additional JS.
Need to: