aboutsummaryrefslogtreecommitdiffstats
path: root/resources/lib/codex/modules/useLabelChecker.js
diff options
context:
space:
mode:
authorAnne Tomasevich <atomasevich@wikimedia.org>2023-10-31 13:46:15 -0400
committerCatrope <roan@wikimedia.org>2023-12-01 00:22:36 +0000
commitb6f8c9525ff2ff033b2e965c71c461875d595730 (patch)
treebc3c409a6d214a2618fd7ee9fa1e603d11e1c784 /resources/lib/codex/modules/useLabelChecker.js
parentadf7aad5fa67fc85c1c74f5c180d419fcd2bc983 (diff)
downloadmediawikicore-b6f8c9525ff2ff033b2e965c71c461875d595730.tar.gz
mediawikicore-b6f8c9525ff2ff033b2e965c71c461875d595730.zip
Add module and manifest files to the codex RL module
In preparation for updates to the CodexModule class, which will enable ResourceLoader modules to request a subset of Codex components, styles, and/or composables, add the distributed module files for each component and composable, plus the generated manifests that map dependencies. This patch both: - Includes the module directory in the foreign resource definition, so the module and manifest files will be included during subsequent releases - Adds the files themselves Bug: T350054 Change-Id: I8f03eceb053d3edb690d6f0182da438cfff7c468
Diffstat (limited to 'resources/lib/codex/modules/useLabelChecker.js')
-rw-r--r--resources/lib/codex/modules/useLabelChecker.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/resources/lib/codex/modules/useLabelChecker.js b/resources/lib/codex/modules/useLabelChecker.js
new file mode 100644
index 000000000000..ed1de1688bd7
--- /dev/null
+++ b/resources/lib/codex/modules/useLabelChecker.js
@@ -0,0 +1 @@
+"use strict";const n=require("./useSlotContents.js"),o=require("./useWarnOnce.js");function t(l,e,a){o.useWarnOnce(()=>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;