Accessible form validation

Hi,
I am using the validation rules and I am having some problems when trying to make them accessible.
Issue 1: When using the (aria-invalid=“false”) in input form field, the value for the attribute doesn’t change to “true” when an error occurs. How can I change the value from false to true on error?

Issue 2: How can I modify the output code for the error message? I need to add an id to it, so that the (aria-describedby) can point to the the error message id?

Thanks

Juan

Issue 1: Use a dynamic attribute for the aria-invalid.

<input dmx-bind:aria-invalid="invalid" required>

Issue 2: The id for the error message div is 'dmxValidatorError' + form.id + (input.name || input.id). So something like:

<form id="Form1">
  <input name="FirstName" dmx-bind:aria-invalid="invalid" aria-describedby="dmxValidatorErrorForm1FirstName" required>
</form>
1 Like

@patrick thanks a lot for the help!
Best regards
Juan