LiveAnnouncer
Use LiveAnnouncer to broadcast aria-live messages to assistive technology from anywhere in your application. Multiple instances of LiveAnnouncer all broadcast into a singular dedicated ARIA-live region.
Each message causes the addition to the region to be announced by screen readers. The message is cleared up after 10 seconds to prevent cluttering of the DOM.
Turn a screen reader on to interact with the example below:
Rules For Developers
- A message is only broadcast if
message
orassertiveness
props change. If you want to re-broadcast the same message, you need to clearmessage
with an empty string first.