DEV Community

Discussion on: Meme Monday

 
auroratide profile image
Timothy Foster

The only time I've ever thought to use an a as a button was for a login button in navigation, where the ask was for it to open up a modal on the page. Sounds great, until we realize some people don't have Javascript, so the purpose of using an a tag was as a fallback to link to a login page.

Javascript adds role="button", and if javascript is disabled, well then the role remains a link.

Thread Thread
 
calinbaenen profile image
Calin Baenen

It's very niche, and I guess I don't have much experience to talk, but that sounds like a really neat solution to an edge-case.