From b4361b0ccfb13b4921b18dc4f8a4b0e5e5c991c4 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Sun, 8 Jan 2023 21:28:35 -0800 Subject: [PATCH] add label for in name fieldset --- scripts/config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/config.js b/scripts/config.js index ba81251..8155971 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -46,12 +46,14 @@ function addMetaLine (fieldset, labelText, inputAttr) { let label = document.createElement("label"); label.innerHTML = labelText; + label.htmlFor = labelText; field.append(label); let input = document.createElement("input"); for (let k in inputAttr) { input.setAttribute(k, inputAttr[k]) } + input.id = labelText; field.append(input); }