JOSHICA

The "ariaLabelCheckBehavior" Experience

Overview

Demo

Example of aria-label Missing

To see this experience in action, open the console in your browser's developer tools. The experience will log a warning if the element is missing an aria-label. In this demo, you will see that when the aria-label and aria-labelledby is missing on the element, a console warning will be present.

Code:

<button ux="ariaLabelCheckBehavior">
    Button Without aria-label
</button>

Live Demo:

Example of aria-label Present

To see this experience in action, open the console in your browser's developer tools. The experience will log a warning if the element is missing an aria-label. In this demo, you will see that when the aria-label is present on the element, there will be no console warning.

Code:

<button ux="ariaLabelCheckBehavior"
    aria-label="opens modal">
    Button With aria-label
</button>

Live Demo:

Example of aria-labelledby Present

To see this experience in action, open the console in your browser's developer tools. The experience will log a warning if the element is missing an aria-label. In this demo, you will see that when the aria-labelledby is present on the element, there will be no console warning.

Code:

<button ux="ariaLabelCheckBehavior"
    aria-labelledby="modalTitle">
    Button With aria-label
</button>

Live Demo:

API

Methods