News for hackers. Stuff that matters.
Re:The Difference Between a Button and a Link by burntcaramel on Wednesday July 29, 2026 @03:34AM (#49094456)
If you have a cancel button inside a form, you can point that button to another form dedicated to deleting with the form attribute: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

I agree with some of this post but the argument feels muddled. "Clicking a logout button navigates the current page to a logged-out one" is wrong — it changes the state of the session, which is more than just a navigation. "Relative links can jump around the current page" — this _is_ a navigation.

I too weighed up the differences between a button and link and referenced the now sadly defunct WAI-ARIA Practices document which I found pretty clear: https://components.guide/accessibility-first/navigation

Re:The Difference Between a Button and a Link by singpolyma3 on Wednesday July 29, 2026 @08:04PM (#49104627)
Even better, don't put it inside that form. If it isn't submit (or clear) the form then the button has no semantic business being parented by the form.