Form > Use aria-describedby with validation text
Problem
- The visible validation text isn't tied to the input via
aria-describedby. - Unecessary ARIA attributes treating the validation text like an alert.
Solution
- While the examples infer that the error input is invalid because it's empty, and the other is valid because it's filled in, this visible text may include details necessary to help either remedy or otherwise understand the state and the
idof the validation text should also be referenced with thearia-describedbyon theinput. - Remove
role="alert",aria-live="assertive", andaria-atomic="true"from the validation text.
Edited by Jeremy Elder
