MAIDR Documentation - v3.72.1
    Preparing search index...

    Function initMaidrOnElement

    • Renders the <Maidr> component around the provided plot element.

      Creates a transparent wrapper, replaces the plot in the DOM, then mounts the React tree so that <MaidrComponent> manages accessibility. The plot element is adopted via DomNodeAdapter (or SizedDomNodeAdapter when it carries data-maidr-host-width / data-maidr-host-height).

      Supports re-initialisation for the same plot element (e.g. a live [maidr] data change): any previously mounted root is unmounted and the plot node is restored to its original DOM position before a fresh root is created. Without this teardown a second init would nest a new React root inside the still- mounted old one, duplicating controllers/hotkeys and leaking the old root.

      Parameters

      • maidr: Maidr
      • plot: HTMLElement

      Returns void