Hidde de Vries writes about how to make error messages accessible. He covers three areas for improving on this for accessibly: identifying errors as errors, notifying the (screenreader) user of new content and describing what happened in clear language.