An API to allow developers to trigger announcements on certain screen events and interactions. This is accomplished by adding a new HTML element aria-live
and method for announcing UI changes aurally.
Use Backdrop.announce() to indicate to screen reader users that an element on the page has changed state. For instance, if clicking a link loads 10 more items into a list, one might announce the change like this.
$('#search-list')
.on('itemInsert', function (event, data) {
// Insert the new items.
$(data.container.el).append(data.items.el);
// Announce the change to the page contents.
Backdrop.announce(Backdrop.t('@count items added to @container',
{'@count': data.items.length, '@container': data.container.title}
));
});
Read about ARIA Live Regions.
See also the related Drupal issue.
Introduced in branch:
1.18.x
Introduced in version:
1.18.2
Impacts:
Module developers
Related Github Issues: