If you have a form that gets submitted using a JavaScript Ajax call (via an API or something) instead of a page reload, you might want to disable the submit button so that the user doesn’t try to resubmit the form while you’re waiting for the API to return a response.
Today, I’m going to show you how to do that without breaking accessibility for people who use assistive technology like screen readers.
Hint: you shouldn’t just slap a [disabled] attribute on it.
The problem with the [disabled] attribute #
I often see people do something like this with their button while the form is submitting
Read more from Go Make Things Website