role="alert"
to the container where the message will appear. Then, when the content of that container changes screen readers will interrupt the user by announcing the message content. The user’s focus will remain in their original location so they can resume their work.