aria-labelledby
aria-labelledby is a code attribute that gives an on-screen element an accessible name by pointing to other text already visible on the page. Instead of typing a label directly into the code, it references the id of one or more existing elements whose text serves as the label. This helps assistive technologies, such as screen readers, announce what a control or region is for.
aria-labelledby is a WAI-ARIA attribute that establishes an accessible name for an element by referencing the id (or a space-separated list of ids) of one or more other elements whose text content forms the label. When multiple ids are supplied, the referenced text is concatenated in the order listed to produce the accessible name. It is commonly used to associate a user interface control, such as a form field, with visible text elsewhere on the page, as described in W3C WCAG technique ARIA16. Because the label is derived from existing content, aria-labelledby is generally preferred over aria-label where suitable visible text already exists. Correct implementation should be verified through manual and assistive technology testing, as automated checks alone do not confirm that the resulting accessible name is meaningful.
Why it matters
An accessible name is how assistive technologies identify what a control or region does. When a form field, button, or landmark lacks a properly associated name, screen reader users may hear only a generic announcement such as "edit text" with no indication of its purpose. aria-labelledby addresses this by tying an element to visible text already present on the page, so the announced name matches what sighted users see. This alignment between the visible and programmatic label supports a more consistent experience across users.
Because aria-labelledby derives its label from existing on-screen content, it is generally preferred over aria-label when suitable visible text already exists. Reusing visible text reduces the risk of the two getting out of sync during future edits and keeps the accessible name meaningful rather than duplicating or contradicting what appears on screen. The W3C documents this approach in WCAG technique ARIA16, which describes associating a user interface control, such as a form field, with text on the page that labels it.
Correct use is not guaranteed by simply adding the attribute. The referenced id must exist and point to text that actually describes the element, and when multiple ids are supplied the referenced text is concatenated in the order listed. A broken reference or a poorly chosen order can produce a confusing or empty accessible name. For this reason, implementation should be confirmed through manual and assistive technology testing; automated checks alone do not confirm that the resulting accessible name is meaningful. This entry is informational and not legal advice.
Who it's relevant to
Inside aria-labelledby
Common questions
Answers to the questions practitioners most commonly ask about aria-labelledby.