function announce(message, {expire}) {
  const element = document.createElement('div');

  element.textContent = message;
  liveRegion.appendChild(element);

  return setTimeout(() => {
    liveRegion.removeChild(element);
  }, expire);
}
function announce(message, {expire}) {
  const element = document.createElement('div');

  element.textContent = message;
  liveRegion.appendChild(element);

  return setTimeout(() => {
    liveRegion.removeChild(element);
  }, expire);
}
function announce ( message , { expire } ) { const element = document . createElement ( 'div' ) ; element . textContent = message ; liveRegion . appendChild ( element ) ; return setTimeout ( ( ) => { liveRegion . removeChild ( element ) ; } , expire ) ; }
Announces message via live region
@param {String} message
@param {Object} options
@param {Number} options.expire
Announces message via live region
announce a message to the live region