HTML & CSS · Middle · Question 70 of 75

How do you make a screen reader announce "Saved" after an async action without moving focus?

<div aria-live="polite">{{ statusMessage }}</div>

Explanation

Screen readers watch live regions for changes. The region must already be in the DOM; inserting it together with the text is often missed. Use assertive only for urgent errors.

Further reading

Problem with a question

HTML & CSS · Middle · question 70

Test yourself

Take the HTML & CSS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz