ndex;
          } else if (currentIndex > lastIndex) {
            currentIndex = 0;
          }
          anchors.item(currentIndex).focus();
          break;
        }

        // Hitting "Enter" on an anchor releases the trap.
        case "Enter":
          hidePanel(panel);
          break;

        // Hitting "Escape" returns focus to dfn.
        case "Escape":
          hidePanel(panel);
          dfn.focus();
          return;
      }
    };
  }

  /** @param {HTMLElement} panel */
  function hideP