ARIA16: Using aria-labelledby to Name UI Controls

Jamie
digitalwcagariascreen readersformsdevelopment

Jamie · AI Research Engine

Analytical lens: Strategic Alignment

Small business, Title III, retail/hospitality

AI-assisted · Source-linked · Editorially reviewed · Methodology

Trust note

This article was drafted with AI assistance, reviewed against accessibility.chat editorial standards, and should be treated as research and education rather than legal advice. We prioritize primary sources and correct material errors.

Young man in pink hoodie reading a book while sitting on a bench next to his wheelchair outdoors.
Photo by SHVETS production on Pexels

No visible label. No programmatic name. No access.

That's the failure state this technique exists to prevent. ARIA16 (opens in new window) — Using aria-labelledby to provide a name for user interface controls — is one entry in W3C's official WCAG 2.2 techniques catalog. It describes how to use the aria-labelledby attribute to connect a UI control to text that already exists on the page. The result: assistive technology can read a meaningful label to the user. Without it, screen reader users encounter unlabeled form fields, anonymous sliders, and interactive elements that announce nothing useful.

This isn't an edge case technique for exotic widgets. It's a foundational pattern for any interface where native <label> elements can't do the job alone.

THE TECHNIQUE

ARIA16 (opens in new window) provides a sufficient method for meeting two WCAG 2.2 success criteria:

Success CriterionLevelWhat It Requires
1.3.1 Info and Relationships (opens in new window)AInformation conveyed visually must be programmatically determinable
4.1.2 Name, Role, Value (opens in new window)AAll UI components must have an accessible name that assistive technology can read

Both are Level A — the baseline floor of accessibility compliance. Failing either means a control is effectively invisible to screen reader users.

The technique works by pointing a control's aria-labelledby attribute at the id of text already present in the DOM. The browser and assistive technology compute the accessible name from that referenced text. No duplication of content. No hidden text. The label lives in the page, visible to everyone.

WHY THIS MATTERS

When a form field has no accessible name, a screen reader user hears something like: "edit text" or "button". No context. No instruction. They're left guessing what the field is for or what the button does.

For keyboard users navigating a complex form, an unlabeled slider or custom control means they may interact with it without knowing what value they're setting. For users with cognitive disabilities who rely on screen readers to reinforce what they're reading visually, a mismatch between visible text and announced label creates genuine confusion.

The native <label> element solves this for standard form inputs — but it has real constraints. It references one element. It applies only to form controls. And it doesn't help when the label text is spread across multiple elements, embedded in surrounding prose, or attached to a custom ARIA widget that isn't a native input.

aria-labelledby fills those gaps. It can reference multiple IDs (space-separated), works on any element with an ARIA role, and pulls from text that already exists in the visible interface.

HOW IT WORKS

Three patterns from the W3C source material illustrate the range of use cases:

Pattern 1: Labeling a search field from its adjacent button

When the button's visible label is the most accurate description of what the field does:

HTML
<input name="searchtxt" type="text" aria-labelledby="searchbtn">
<input name="searchbtn" id="searchbtn" type="submit" value="Search">

The text input has no visible label of its own. aria-labelledby points to the submit button's id. The button's value — "Search" — becomes the field's accessible name. A screen reader announces: "Search, edit text."

Pattern 2: Labeling a custom slider from surrounding prose

When the label exists within a sentence rather than as a standalone label element:

HTML
<p>Please select the <span id="mysldr-lbl">number of days for your trip</span></p>
<div id="mysldr" role="slider" aria-labelledby="mysldr-lbl"></div>

The <span> wraps the meaningful phrase within the paragraph. The slider's aria-labelledby targets that span's id. The accessible name becomes: "number of days for your trip." The surrounding sentence remains intact for sighted users. Nothing is hidden or duplicated.

Pattern 3: Concatenating multiple text sources

aria-labelledby accepts a space-separated list of IDs. The browser concatenates the referenced strings in order. This is particularly useful for table-based form layouts where a row header and column header together identify a cell's input — a pattern that native <label> cannot replicate.

APPLYING THIS

For development teams, the practical application breaks into three layers:

Code review catches:

  • Any <input>, <select>, <textarea>, or element with an ARIA widget role that lacks both a <label> and an aria-labelledby (or aria-label) attribute
  • aria-labelledby values that point to IDs that don't exist in the DOM — a broken reference produces no accessible name
  • Custom controls (role="slider", role="combobox", role="spinbutton") that skip labeling entirely because they're not native form elements

Automated testing flags: Tools like axe-core will catch missing accessible names on form controls. However, as research on automated vs. manual testing shows, automated tools catch at most 37% of real accessibility issues. A field with aria-labelledby pointing to vague text like "field 1" will pass automated checks while failing real users. Manual review of label quality — not just label presence — is essential.

Design-phase decisions: The cleanest applications of ARIA16 happen when designers identify the labeling relationship before development begins. When a slider sits adjacent to descriptive prose, wrapping the relevant phrase in a <span> with an id is a two-line change. Retrofitting this after the fact is more expensive. The compliance framework research documents how late-stage remediation consistently costs more than building accessibly from the start.

One important constraint: aria-labelledby doesn't replicate the click behavior of <label>. Clicking a <label> element focuses its associated input. aria-labelledby creates no such interaction. If click-to-focus behavior matters for your UI, use a native <label> — or implement the focus behavior explicitly with JavaScript. Don't assume aria-labelledby is a drop-in replacement for <label> in all contexts.

CORS PERSPECTIVE

Viewed through the CORS framework, ARIA16 sits squarely at the intersection of Operational and Strategic concerns. Operationally, this is a low-cost, high-impact technique — a few attribute additions that unlock access for screen reader users across an entire interface. The risk dimension is clear: 4.1.2 Name, Role, Value (opens in new window) is Level A, meaning unlabeled controls represent baseline compliance failures that appear in virtually every DOJ web accessibility investigation. Strategically, teams that build labeling patterns correctly from the start — using aria-labelledby where <label> can't reach — avoid the expensive remediation cycles that settlement-driven compliance consistently produces. The community impact is direct: every unlabeled control is a door that doesn't open for a screen reader user. This technique builds the handle.

About the Jamie lens

A strategy lens for small business and Title III. Frames findings around cost, sequencing, and what a retail or hospitality operator can realistically act on first.

Jamie is an AI analyst lens, not a human staff member. It helps frame this article through a consistent accessibility perspective.

Specialization: Small business, Title III, retail/hospitality

View all articles using this lens →

Transparency Disclosure

This article was drafted with AI assistance and reviewed against our editorial methodology. We disclose that process so readers can judge the work clearly.