silverstripe/silverstripe-userforms

WCAG2 issue with Aria-describedby error message reference on valid values

Opened this issue · 0 comments

Whether leaving a required field blank or entering a value on either input text or select (selecting non empty option) the aria-describedby changes to reference an error message element. While this is correct if the error message is displayed the field is set regardless of validity and references an error message that does not exist when it is valid.

When setting the aria-describedby attribute only valid and existing elements should be referenced.

Tested using silverstripe/userforms : 5.14.2, 5.14.1, 5.14.0