DEV Community

Discussion on: Disable a HTML form while in-flight using fieldset

Collapse
 
matthijsewoud profile image
⚡️

I usually just do pointer-events: none in CSS, that does the trick.

Collapse
 
samthor profile image
Sam Thorogood

The tab key or alternative methods of access can trivially get "under" your block.

Collapse
 
matthijsewoud profile image
⚡️

Sure, makes sense. But to me it’s mostly a style-thing, y’know? I check for repeated request with a nonce and stuff anyway, so if someone is uncles to really try to to that, I don’t care.

Unless, it might be bad for accessibility, now that I think of it :-/

Thread Thread
 
samthor profile image
Sam Thorogood

Oh good. I mean you're dealing with a repeat submission issue your way, and that's great—that's the actual problem I want to help readers solve—but maybe do consider accessibility.

e.g. What happens if I use 'enter' to submit the form (which I find really awkward anyway) or 'space' if I'm focused on the button. I probably still have focus and could submit again.