E-mail List Archives
Forms that delete something
From: Laurence Hughes
Date: Jan 8, 2024 1:49PM
- Next message: Dean.Vasile@outlook.com: "Re: Forms that delete something"
- Previous message: Athol J Gow: "2024 Virtual Accessibility Conference Call for Presentations"
- Next message in Thread: Dean.Vasile@outlook.com: "Re: Forms that delete something"
- Previous message in Thread: None
- View all messages in this Thread
Hi,
My company's web app is written in Ruby on Rails. As a developer, when you
want to let the user delete something (from the database), a common
approach is to use the Rails `button_toâ method. As a developer you pass
into this method some text for a button and a URL for a server resource
which will handle deleting the data. In terms of rendered HTML, the method
generates a form set to use the POST method and to submit to the URL you
provided. The form includes a button of type âsubmitâ and no other form
elements except a hidden input which tells Rails to perform an HTTP DELETE
rather than a POST.
As a sighted user, all I see is a button.
I see some benefits to this pattern. Developers have, for a long time,
misused links (with the help of JavaScript) to enable deletion, and this
isn't good. As we know, links are for a different purpose, and using a link
for an unintended purpose breaks user expectations.
But while I'm sure that a link is the wrong tool for the job of deleting
something from a database, I'm also not 100% sure whether a form, that only
includes a single element (a button), is the right interface to present.
The user isn't really âinputtingâ anything, either to add, edit or search,
so is a form OK here?
Would this feel weird to a screen reader user? A form with no other
elements except a button that says âDelete xyzâ? Or am I being silly and
this is perfectly normal, and is the expected/conventional way to provide a
âDelete xyzâ interface accessibly?
Thanks in advance for any advice!
Laurence
- Next message: Dean.Vasile@outlook.com: "Re: Forms that delete something"
- Previous message: Athol J Gow: "2024 Virtual Accessibility Conference Call for Presentations"
- Next message in Thread: Dean.Vasile@outlook.com: "Re: Forms that delete something"
- Previous message in Thread: None
- View all messages in this Thread