Live regions are created by using the aria-live
attribute, or an attribute that applies (implies?) it, such as [[20211110135435-aria-role-status-alert]]. They announce to screen readers when the inner content changes, and read the new content. Note that live regions only announce changes to the content if the element was present with an aria-live
attribute before the change. i.e. you can't conditionally render the live region.
From what I understand, these should be shied away from. They're tricky to get correct, and are often disruptive, especially if there are numerous live regions on the page.
However they should still be used when appropriate, e.g. for search results messages.
There are two allowed values (technically three), polite
, assertive
, and off
.
https://www.sarasoueidan.com/blog/accessible-notifications-with-aria-live-regions-part-1/