addPointerInTextLayer(element, isRemovable) {
    const { id } = element;
    if (!id) {
      return null;
    }

    if (!this.#enabled) {
      // The text layer needs to be there, so we postpone the association.
      this.#waitingElements.set(element, isRemovable);
      return null;
    }

    if (isRemovable) {
      this.removePointerInTextLayer(element);
    }

    const children = this.#textChildren;
    if (!children || children.length === 0) {
      return null;
    }

    const index = binarySearchFirstItem(
      children,
      node =>
        TextAccessibilityManager.#compareElementPositions(element, node) < 0
    );

    const nodeIndex = Math.max(0, index - 1);
    const child = children[nodeIndex];
    this.#addIdToAriaOwns(id, child);
    this.#textNodes.set(id, nodeIndex);

    const parent = child.parentNode;
    return parent?.classList.contains("markedContent") ? parent.id : null;
  }
Find the text node which is the nearest and add an aria-owns attribute
in order to correctly position this editor in the text flow.
@param {HTMLElement} element
@param {boolean} isRemovable
@returns {string|null} The id in the struct tree if any.