Live region politeness is set through the aria-live attribute. Polite waits for the screen reader to finish its current announcement before reading the update, appropriate for things like a cart item count changing. Assertive interrupts immediately, reserved for urgent messages like a failed payment or a session about to expire, since overusing it becomes disorienting.
Choosing the wrong politeness level is a common, subtle mistake: marking routine status updates as assertive creates a constant stream of interruptions, while marking a genuine error as polite can mean a user misses it entirely.