announce = (message, mode) => {
    // If no type is presented, fallback to polite announcement.
    const span = mode === _InvisibleMessageMode.default.Assertive ? assertiveSpan : politeSpan;
    // Set textContent to empty string in order to trigger screen reader's announcement.
    span.textContent = "";
    span.textContent = message;
    if (mode !== _InvisibleMessageMode.default.Assertive && mode !== _InvisibleMessageMode.default.Polite) {
      console.warn(`You have entered an invalid mode. Valid values are: "Polite" and "Assertive". The framework will automatically set the mode to "Polite".`); // eslint-disable-line
    }
    // clear the span in order to avoid reading it out while in JAWS reading node
    setTimeout(() => {
      // ensure that we clear the text node only if no announce is made in the meantime
      if (span.textContent === message) {
        span.textContent = "";
      }
    }, 3000);
  }
Inserts the string into the respective span, depending on the mode provided.

@param { string } message String to be announced by the screen reader.
@param { InvisibleMessageMode } mode The mode to be inserted in the aria-live attribute.
@public