Skip to content
SilktideHelp

Missing ARIA label IDs

Silktide checks elements that take their from other elements by ID, and reports references to IDs that don't exist on the page. A broken reference leaves the element without the name it was meant to have.

The attribute aria-labelledby names an element by pointing at the id of the element containing its label - a heading naming a dialog, or a caption naming a control:

<!-- Problem: the reference says "dialog-label" but the heading's id is "dialog-labell" -->
<h2 id="dialog-labell">Important message!</h2>
<div role="dialog" aria-labelledby="dialog-label">

Why this matters

The accessible name is what a announces when a visitor reaches an element. When an aria-labelledby reference points at nothing, the element may be announced with no name at all - an unnamed dialog, an unnamed button - and the visitor has to guess its purpose. These breaks are invisible: the page looks identical, and even careful user testing rarely catches a name that silently failed to attach. IDs get renamed and content gets restructured, so references rot over time.

How to fix it

  1. Find the element that was meant to provide the name, and make the aria-labelledby value match its id exactly (IDs are case sensitive):
<!-- Fixed: the reference matches the heading's id -->
<h2 id="dialog-label">Important message!</h2>
<div role="dialog" aria-labelledby="dialog-label">
  1. If the labeling element was removed, either restore it or switch to an aria-label attribute containing the name as text.
  2. When one element is named by several others, list every ID separated by spaces, and check each one.

How Silktide tests this

  1. Find every element with an aria-labelledby attribute on each page.
  2. Split the attribute value into individual IDs.
  3. Report each referenced ID that does not exist anywhere on the page.

Learn more

Last updated

Was this page helpful?

Missing ARIA label IDs | Silktide Help