Make sure that error and alert messages are accessible to screen reader users.
General Guidelines
Do not rely on color alone to convey the error or alert message when something is not completed correctly or missing.
...
Compliant Error Message Treatment
...
Accessible Inline Error Messages
Make inline error messages accessible to screen reader users by adding ARIA labels.
...