MAIDR JavaScript API
    Preparing search index...

    Function describeWithInstruction

    • Points an element's aria-describedby at one of MAIDR's instruction elements, or at none of them, and leaves every other id where it is.

      A page can describe the chart too: r-maidr gives it the author's alt text and caption. MAIDR's id goes last, so a reader hears what the chart shows before how to use it.

      Parameters

      • element: Element

        The plot element

      • instructionIds: readonly string[]

        Every id MAIDR's instructions may be under

      • id: string | null

        The one to describe the element by, or null for none

      Returns void