aria-labelledby

An ARIA attribute that names an element using the text of one or more other elements, referenced by their id.

In more detail

It has the highest priority in the accessible name computation. Dialogs use it to point at their heading, and tabs panels use it to point at their tab. The referenced element can even be hidden.

Examples

<div role="dialog" aria-labelledby="m1-t"><h2 id="m1-t">Profile</h2>...</div>
useId generates the id in React so the pair stays unique.

Related terms

Taught in

References