I don't imply that, you can add some text, it would still not make the original fundamental UI feedback benefit disappear and make it a lazy hack. The text is ok as an addition, but worse as a substitute - the feedback should be a property of the UI element you interact with.
> , by using a bit of special casing and CSS polish for the "submitting disabled" button..
or by simply adding a different label to the now disabled button?
> why use the disabled attribute at all
to get the same outcome in a simpler manner? But if you recreate all the pieces with in an alternative way, that's fine, don't toggle the attribute
Re:Don't Disable Buttons
by moritzwarhier on Saturday November 11, 2023 @12:55PM
(#38232640)
> I don't imply that, you can add some text, it would still not make the original fundamental UI feedback benefit disappear
What original fundamental feedback? The default disabled style of a form button is not what a button should change to after submit?
What about some stupid text below the button: "Your data is being submitted..."?
Seems the meat of the argument is the disabling behavior, which is really trivial to implement in JS.
When I want to submit a form and the button changes to a regular grayed-out disabled button on click, on top of that without a page reload, I'd assume something went wrong.
You need to distinguish "disabled" from "action in progress" any way, by using a bit of special casing and CSS polish for the "submitting disabled" button... in which case, why use the disabled attribute at all, instead of preventing submit in JS?
It's not harder compared to toggling attribute in JS.