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.
plot is typed as Element, not HTMLElement: charting libraries render
into <svg>, which is an SVGElement. Only basic node capabilities
(parentNode, attributes) are needed here, and both branches of the DOM tree
provide them.
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 carriesdata-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.
plotis typed asElement, notHTMLElement: charting libraries render into<svg>, which is anSVGElement. Only basic node capabilities (parentNode, attributes) are needed here, and both branches of the DOM tree provide them.