|
|
|
|
|
by alexpetros
3 hours ago
|
|
> This seems to conflate appearance with semantics. If an element causes a navigation, I make it a link. Neither of my examples work with links. Logout buttons must be buttons because they trigger unsafe requests, and "search" buttons are buttons because they submit the form as a query parameter. Both of these examples, are, however, navigations.[0] > Whether it looks like a button is irrelevant, that’s CSS. It's not irrelevant, because even if you style a link like a button (or vice versa), it will still behave like the thing it actually is. That's why it's important to have native HTML behavior that lets people use the right semantic element. [0] https://html.spec.whatwg.org/multipage/browsing-the-web.html... |
|
But this is just more of the pedantic developer nonsense that everyone is complaining about here.
I’ve built tons of sites in my time, and the logout “button” is always a link to “/?logout=1”. In 30 years, this has never caused a problem.