Live Region

Accessibilityadvanced

// Definition

A page area marked with `aria-live` so screen readers announce changes to it without the user moving focus there — used for toasts, form-validation errors, search-result counts, and status messages. `aria-live="polite"` waits for a pause; `assertive` interrupts. It's how dynamic updates reach screen-reader users at all.

// Why it matters

Dynamic content that updates silently is invisible to screen-reader users — a toast saying "saved" or an error "email is invalid" simply never reaches them without a live region. QA cares because SPAs are full of these silent updates, and it's a subtle failure: the page works perfectly for sighted users while announcing nothing to others.

// How to test

// The status container must be a live region so updates are announced
cy.get('[data-cy=form-status]').should('have.attr', 'aria-live', 'polite')
cy.get('[data-cy=submit]').click()
cy.get('[data-cy=form-status]').should('contain', /saved/i)
// Full confidence needs a real screen-reader pass — axe can't HEAR the announcement

// Common mistakes

  • Toasts/errors/validation that update with no live region (silent to AT)
  • assertive everywhere, interrupting the user constantly (reserve for urgent)
  • Injecting the live region at the same time as its content (must pre-exist to announce)

// Related terms