Re:The unreasonable effectiveness of simple HTML
by ogre_codes on Wednesday January 27, 2021 @02:58PM
(#25933116)
FWIW, I'm not an expert on this so take what I say with a grain of salt.
An anchor tag that links to another page but looks like a button is probably fine. So long as you can access them via the keyboard (tabbing to it) and they have a distinct appearance when focused so if you are tabbing through you can see whats active (this is different from the hover attribute).
Re:The unreasonable effectiveness of simple HTML
by wizzwizz4 on Wednesday January 27, 2021 @02:52PM
(#25933042)
Conceptually, those are links, not buttons. Buttons are for forms and JavaScript and such.
Re:The unreasonable effectiveness of simple HTML
by codazoda on Wednesday January 27, 2021 @03:13PM
(#25933314)
Fair. I would typically us a form tag with an input tag inside it for forms. Sounds like the button tag can be styled a little more because it allows i, em, br, img, and similar tags inside it, while an input does not. They are interchangable in the case of a form (based on your style need).
Re:The unreasonable effectiveness of simple HTML
by petepete on Thursday January 28, 2021 @03:22AM
(#25939505)
There are more ways to interact with a link than a button.
You can drag it to your tab bar, bookmarks or desktop, middle click to open in a new tab, copy the target URL etc.
With a button you can push it.
I created a minimalist CSS framework called Neat CSS (https://neat.joeldare.com). I use anchors instead of buttons and explain why in the quote below. I'd love feedback on the accessibility of that alternative.
It's best to use semantic web tags whenever possible. Buttons are a unique case where you're typically linking somewhere, but the button tag doesn't currently support the href attribute. So, buttons are anchor tags with a class of button.