wiki.techinc.nl/resources/lib/codex/modules/useLabelChecker.js
Eric Gardner bc07829e7b Update Codex from v1.2.1 to v1.3.0
Also introduces a new design token (@border-color-muted) and
updates some resource module definitions to use .cjs filenames
per upstream.

Bug: T324688
Bug: T338184
Bug: T338802
Bug: T346815
Bug: T349016
Bug: T350197
Bug: T352585
Bug: T352931
Bug: T354547
Bug: T354759
Bug: T355081
Bug: T355160
Bug: T355551
Change-Id: Idcfdee4583018500d06e37fda2ee4925111f1915
2024-01-23 14:03:05 -08:00

1 line
475 B
JavaScript

"use strict";const n=require("./useSlotContents.js"),o=require("./useWarnOnce.cjs");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;