addShortcut(element, shortcut) {
    // Avoid infinite recursion.
    if (!element || !this.root || (this.root === this)) {
      return;
    }

    if (!shortcut) {
      shortcut = this.component.shortcut;
    }

    this.root.addShortcut(element, shortcut);
  }
Adds a keyboard shortcut to this component.
@param {HTMLElement} element - The element to attach the keyboard shortcut to.
@param {string} shortcut - The keyboard shortcut to add.
@returns {void}