From 6f1719db710653682b10f98f6a9fcac0d9d00740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Hoyer?= Date: Tue, 5 Dec 2023 12:39:39 -0300 Subject: [PATCH 1/4] :sparkles: (form-control-has-label): Add meter, output, and progress to default list of controls to check --- src/rules/form-control-has-label.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rules/form-control-has-label.ts b/src/rules/form-control-has-label.ts index 9b147400..bc382459 100644 --- a/src/rules/form-control-has-label.ts +++ b/src/rules/form-control-has-label.ts @@ -81,6 +81,9 @@ const rule: Rule.RuleModule = { "input", "textarea", "select", + "meter", + "output", + "progress", ...(options.controlComponents || []) ]; From d41b34afedd1d355a2e9c6a67115687a3e307a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Hoyer?= Date: Tue, 5 Dec 2023 13:02:50 -0300 Subject: [PATCH 2/4] :bug: (form-control-has-label): allow form-element to pass if it has an id Closes #924 --- .../__tests__/form-control-has-label.test.ts | 24 +++++++++++++-- src/rules/form-control-has-label.ts | 29 ++++++++++++++----- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/src/rules/__tests__/form-control-has-label.test.ts b/src/rules/__tests__/form-control-has-label.test.ts index 2442afd3..da466eb9 100644 --- a/src/rules/__tests__/form-control-has-label.test.ts +++ b/src/rules/__tests__/form-control-has-label.test.ts @@ -5,8 +5,22 @@ makeRuleTester("form-control-has-label", rule, { valid: [ "", "", - "", "", + ` +
+ + +
+ `, + ` +
+ +
+ +

Here is some extra info what I agree upon

+
+
+ `, `