Mike-Heneghan / ALISS

ALISS (A Local Information System for Scotland) is a service to help you find help and support close to you when you need it most.
https://aliss.org
0 stars 0 forks source link

Investigate aria-role best practices. #107

Closed Mike-Heneghan closed 4 years ago

Mike-Heneghan commented 4 years ago

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:

Mike-Heneghan commented 4 years ago

Good article on anchors vs buttons.

https://bitsofco.de/anchors-vs-buttons/

Mike-Heneghan commented 4 years ago

https://medium.com/simple-human/but-sometimes-links-look-like-buttons-and-buttons-look-like-links-9b371c57b3d2

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.

Mike-Heneghan commented 4 years ago

https://marcysutton.com/links-vs-buttons-in-modern-web-applications

Mike-Heneghan commented 4 years ago

https://davidwalsh.name/html5-buttons#targetText=The%20Difference%20Between%20Anchors%2C%20Inputs%20and%20Buttons&targetText=One%20of%20the%20things%20I,the%20third%20is%20an%20input.

Mike-Heneghan commented 4 years ago

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:

Screenshot 2019-09-19 at 15 00 59

Some places these rules do not apply are the actions on the service detail pages etc.

Screenshot 2019-09-19 at 15 10 31

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.

Mike-Heneghan commented 4 years ago

https://www.w3.org/TR/html-aria/#allowed-aria-roles-states-and-properties

digitalWestie commented 4 years ago

Should links that open modals also navigate to them?

Mike-Heneghan commented 4 years ago

Associated issues closed