HTML ARIA role="alert"


A message with important, and usually time-sensitive, information.

<div role="alert" aria-live="assertive">Your session will expire in 60 seconds.</div>

Note that I've included both role="alert" and aria-live="assertive" at the same time. These are synonymous attributes, but some screen readers only support one or the other. By using both simultaneously we therefore maximize the chances that the live region will function as expected.

Source - Heydon Pickering 'Some practical ARIA examples'