• [ADDED IN VERSION 5.0.1]
    For screen reader support: Sets the aria-label attribute of the icon within the provided element. Screen readers will then read the label when moused over.

    Parameters

    • div: any

      The div which contains the icon.

    • label: any

      The label for screen readers to read when moused over.

    Returns void

    Example

    <div data-icon="home"><svg>...</svg></div>

    setIconAriaLabel(myDiv, 'Home button');
    The div becomes <div data-icon="home"><svg aria-label='Home button'>...</svg></div>

    Method

    setIconAriaLabel