I'm working on a webassembly frontend and progressive enhancement is very important, since it's not that widely supported.
I'm trying to get it right, but I found out it's much harder than I expected. In the first iteration, I've tried to rely on HTML native validations as much as possible, but I had mixed success:
- It doesn't seem to scroll the user to the failing fields in some devices + browsers (In my case, it doesn't do anything in Firefox + Android)
- Since the user can't submit the form, I can't take the data into the backend to provide a better user experience (for example, find the missing fields, and re-render the page with a list of them, which would work even without any JS)
My question is whether this is actually a good idea? Maybe I should just have removed all HTML validations and use JS (WASM in this case) for client-side validation, and always allow the user to submit the form and validate in the backend in case of no JS/WASM support.