Open madelondohmen opened 2 days ago
Is there a good reason why the form has novalidate? https://github.com/minvws/nl-kat-coordination/blob/main/rocky/rocky/templates/upload_raw.html#L20C23-L20C33 That would at least catch the frontend issue. the backend issue needs seperate logic / error handling.
I see we do novalidate on many forms, but I think its bad form to not use the frontend validation were possible.
@HeleenSG Do you know this?
I think we have novalidate because the client-side errors are not a11y compatible. This is a stupid problem caused by screenreaders / browsers which don't properly attribute the explanation/error messages to the input fields, and or don't show the error long enough (which should be a browser setting for those who experience problems reading these errors).
We could opt for client-side validation using javascript and or custom Error handling on the available form controls. The Javascript could then inject the 'correct' and a11y friendly error messages. We would still also need to do backend validation, and as such would need to write the same error handling logic and rules twice.
Describe the bug When adding a raw file, it is possible to leave the required fields empty and continue, which will result in a KeyError.
To Reproduce Steps to reproduce the behavior:
Expected behavior An error message should be thrown in the form and a user should not be able to continue.
Screenshots
OpenKAT version main