From 835b7261aaa1449eff34baab810d2019605c9383 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Sun, 8 Jan 2023 21:23:08 -0800 Subject: [PATCH] add image alts in config page, add for to labels in config page --- scripts/config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/config.js b/scripts/config.js index 806946b..d7149f5 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -60,16 +60,19 @@ function addResourceLine (fieldset, iconHref, labelText, inputAttr, unitText=nul let icon = document.createElement("img"); icon.src = iconHref; + icon.alt = labelText; field.append(icon); let label = document.createElement("label"); label.innerHTML = labelText; + label.for = 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); if (unitText) { @@ -96,5 +99,6 @@ function addDiskLine (fieldset, id, iconHref, labelText, valueText) { let config = document.createElement("img"); config.src = "images/actions/config-active.svg"; + config.alt = `Config disk ${labelText}`; field.append(config); } \ No newline at end of file