From 693dbf3d9f3746f09ae2686fb4fe5d83da00eea9 Mon Sep 17 00:00:00 2001 From: Charchit Kapoor <44813851+Being-Maverick@users.noreply.github.com> Date: Fri, 13 Nov 2020 04:21:42 +0530 Subject: [PATCH] Checks added for attributes in label and input element (#43) Co-authored-by: Jack Domleo <43371432+jackdomleo7@users.noreply.github.com> --- checka11y.css | 36 ++++++++++++++++++++++++++++++++++++ package.json | 3 ++- test/index.html | 11 +++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/checka11y.css b/checka11y.css index 8f4727a..6160ec1 100644 --- a/checka11y.css +++ b/checka11y.css @@ -172,3 +172,39 @@ u::after { content: "WARNING: Using -moz-element could be confused as a hyperlink, consider using a different -moz-element such as or ." !important; content: "WARNING: Using element could be confused as a hyperlink, consider using a different element such as or ." !important; } + +label:not([for]){ + border: var(--checka11y-error-border-width, 5px) solid var(--checka11y-error-color, red) !important; +} + +label:not([for])::after{ + content: "ERROR: Ensure that