6 ms·
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.or
by burntcaramel 2mo ago
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/Attributes/form 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 https://components.guide/accessibility-first/navigation
- singpolyma3 2mo agoEven 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.