add image alts in config page,
add for to labels in config page
This commit is contained in:
parent
72ec1c134f
commit
835b7261aa
@ -60,16 +60,19 @@ function addResourceLine (fieldset, iconHref, labelText, inputAttr, unitText=nul
|
|||||||
|
|
||||||
let icon = document.createElement("img");
|
let icon = document.createElement("img");
|
||||||
icon.src = iconHref;
|
icon.src = iconHref;
|
||||||
|
icon.alt = labelText;
|
||||||
field.append(icon);
|
field.append(icon);
|
||||||
|
|
||||||
let label = document.createElement("label");
|
let label = document.createElement("label");
|
||||||
label.innerHTML = labelText;
|
label.innerHTML = labelText;
|
||||||
|
label.for = labelText;
|
||||||
field.append(label);
|
field.append(label);
|
||||||
|
|
||||||
let input = document.createElement("input");
|
let input = document.createElement("input");
|
||||||
for (let k in inputAttr) {
|
for (let k in inputAttr) {
|
||||||
input.setAttribute(k, inputAttr[k])
|
input.setAttribute(k, inputAttr[k])
|
||||||
}
|
}
|
||||||
|
input.id = labelText;
|
||||||
field.append(input);
|
field.append(input);
|
||||||
|
|
||||||
if (unitText) {
|
if (unitText) {
|
||||||
@ -96,5 +99,6 @@ function addDiskLine (fieldset, id, iconHref, labelText, valueText) {
|
|||||||
|
|
||||||
let config = document.createElement("img");
|
let config = document.createElement("img");
|
||||||
config.src = "images/actions/config-active.svg";
|
config.src = "images/actions/config-active.svg";
|
||||||
|
config.alt = `Config disk ${labelText}`;
|
||||||
field.append(config);
|
field.append(config);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user