aboutsummaryrefslogtreecommitdiffstats
path: root/resources/lib/codex/modules/useLabelChecker.js
blob: e2d75aa77068b0d9225e5658caabd3e6035555a4 (plain) (blame)
1
"use strict";const n=require("./useSlotContents2.js"),o=require("./useWarnOnce.js");function t(l,e,a){o(()=>n.useSlotContents(l).length===0&&!(e!=null&&e["aria-label"])&&!(e!=null&&e["aria-labelledby"]),"".concat(a,": Inputs must have an associated label. Provide one of the following:\n - A label via the appropriate slot\n - An `aria-label` attribute set to the label text\n - An `aria-labelledby` attribute set to the ID of the label element"))}exports.useLabelChecker=t;