find method infrastructure ✓ 100.0%
Last updated: 2026-02-24T19:46:21.776Z
Metrics
LOC: 8
Complexity: 3
Params: 1
Coverage: 100.0% (5/5 lines, 70x executed)
Signature
find(element: HTMLElement): : LabelResult | null
Source Code
find(element: HTMLElement): LabelResult | null {
const ariaLabelledBy = element.getAttribute("aria-labelledby");
if (!ariaLabelledBy) return null;
const ref = document.getElementById(ariaLabelledBy);
const text = ref?.textContent?.trim();
return text ? { text, strategy: "aria-labelledby" } : null;
},
Dependencies (Outgoing)
| Target | Type |
|---|---|
| LabelResult | uses |
| LabelStrategy | uses |
No incoming dependencies.