open-formulieren / open-forms

Smart and dynamic forms
https://open-forms.readthedocs.io
Other
37 stars 26 forks source link

Accessibility improvements - Error and help messages #4719

Closed robinmolen closed 2 weeks ago

robinmolen commented 1 month ago

Thema / Theme

Frontend

Omschrijving / Description

This issue is related to #4622

This issue targets the error and help message improvements of the accessibility rapport:

Added value / Toegevoegde waarde

No response

Aanvullende opmerkingen / Additional context

No response

robinmolen commented 1 month ago

Regarding 3.3.3: The translation for the 'Invalid postcode' message has been changed, so all regular postcode fields will now show the expected postcode format. For the pre-fill postcode its a bit more complicated...

The pre-fill postcode doesn't use the validate config, it also isn't added to the DB. I expect its because the type is set to 'textfield' (to allow the pre-fill functionality). So the error message, and validation, is pure because of the inputMask. I've added a custom error message for mask errors on this field, so new pre-fill postcode fields will have the correct error message.

We cannot change the default message for mask errors, because this then would cause issues for other fields with mask validation (i.e. bsn)