WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Forms that delete something

for

From: Jeremy Echols
Date: Jan 8, 2024 3:47PM


Agreed - the HTML "form" may feel like it's incorrect because the name "form" sort of suggests to our collective conscious something with lots of blank spaces that needs information. But it is indeed the right element to use for deletion.

Think of it as a pre-filled paper form where all you have to do is submit it to the right person / organization in order to, say, start a free trial of Sirius XM or something. All the necessary data was pre-printed onto that form because they want it to be easy, so all you have to do is submit it. Same concept with the button-only form: it's been "pre-filled" with the hidden values (such as the request to delete a record). And the action itself, which holds the destination URL, is also just pre-filled data telling the form what it's for and likely the database ID of the record to delete.