Lesson 14 of 30
A screen reader automatically reads what's on the page at load and whatever the user navigates focus to. Content that changes on its own — a toast, a validation error, an updated result count — is silent unless the browser is explicitly told to announce it.
13 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A save confirmation toast appears on screen after a form submission, with no focus change. Without any aria-live handling, what does a screen reader user experience?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
A screen reader's default behavior covers two situations well: content present when the page first loads, and content the user explicitly moves focus to (tabbing to a field, following a link). What it doesn't cover automatically is content that changes without a focus change — a toast notification appearing after a save, a "5 new results" count updating after a filter is applied, a validation error appearing under a form field the user never left. None of that gets announced by default. It just silently changes on screen, visible to a sighted user and invisible to a screen reader user unless something specifically tells the browser to speak it.
aria-live regions are that mechanism: an element marked aria-live gets its text changes announced automatically, without requiring focus to move there at all.
<!-- Present in the DOM from page load, empty until needed -->
<div id="toast" aria-live="polite" class="sr-announcement"></div>
function showToast(message) {
document.getElementById("toast").textContent = message;
}
An empty aria-live="polite" container already sits in the DOM, invisible, waiting.
The aria-live="polite" value tells the screen reader: announce this change, but wait until it finishes whatever it's currently reading first — don't interrupt. That's the right choice for the large majority of dynamic updates: a save confirmation, an updated result count, a toast. aria-live="assertive" is the other option, and it interrupts immediately, cutting off whatever the screen reader was in the middle of announcing. That's appropriate only for genuinely urgent, time-sensitive information — an error that blocks the user from continuing, a session about to expire — because reaching for assertive by default is a real, disorienting anti-pattern: it talks over the user constantly, for updates that were never actually urgent.
aria-live element at the same moment as its content is a common source of "it works sometimes" bug reports — the fix is a persistent, empty container updated in place.assertive is not "the stronger, more reliable option" — it's for genuine interruptions only. Defaulting every live region to assertive "to be safe" produces a constantly-interrupting experience that's worse than silence for a screen reader user.display:none) is required if it shouldn't be visible on screen — display:none or visibility:hidden removes an element from the accessibility tree entirely, which means its aria-live announcements stop working too."A toast notification shows up after a save, but only sighted users notice it — how do you fix that?" is a real, practical interview question, and a strong answer names aria-live="polite" with a persistent container specifically, not just "add ARIA" in the abstract.