Missing or Invalid IDs Referenced by ARIA Attributes (aria-labelledby, aria-describedby)
WCAG Focus: WCAG 4.1.2 (A), 1.3.1 (A)
Attributes like aria-labelledby="hint-1" and aria-describedby="err-1" link controls to their labels and help text. If a template edit deletes or renames the target element’s id—or if two widgets share a conflicting ID—the ARIA reference points to nothing, silencing critical labels or validation instructions.
Why This Pattern Violates WCAG
WCAG 4.1.2 Name, Role, Value (Level A) and 1.3.1 Info and Relationships (Level A) fail when broken ID references sever the programmatic link between an interactive control and its accessible name or description.
Code Comparison
Broken ARIA Reference (Missing Target ID)
<input type="password" aria-describedby="pwd-rules">
<!-- Bug: #pwd-rules was deleted or misspelled as #password-rules -->
<p id="password-rules">Must be at least 12 characters.</p>
Compliant Matching ID Reference
<input type="password" aria-describedby="pwd-rules">
<p id="pwd-rules">Must be at least 12 characters.</p>
How to Fix It in WordPress
- Verify every ID listed in aria-labelledby, aria-describedby, and aria-controls exists uniquely in the DOM.
- Generate unique per-instance IDs inside reusable WordPress shortcodes and blocks.
Finding This Issue Automatically
Broken aria-labelledby and aria-describedby references are silent bugs that never appear visually on screen. The WP ADA Compliance Check plugin cross-checks ARIA ID references against the DOM across your WordPress pages, flagging missing or invalid target IDs immediately.
Subscribe
Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

