If a live region (element with role="alert" is also a live region) is present on page load and its content does not
change, then some screen readers do not read it out. So you have to either
- have the alert already on the page (but visually hidden) and change its text content when it needs to be announced, or
- attach the alert to the DOM only when it needs to be announced
Alarm A
Alarm B
Alerting alarm B