From 63bd859e17907a3506e42f28d41ee3af49953eec Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Mon, 9 Jun 2025 13:36:44 +0200 Subject: [PATCH] luci-base: set output elements to use output element type Signed-off-by: Paul Donald --- modules/luci-base/htdocs/luci-static/resources/form.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index f65d25e91a..002c145b7d 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -4530,7 +4530,8 @@ const CBIDummyValue = CBIValue.extend(/** @lends LuCI.form.DummyValue.prototype renderWidget(section_id, option_index, cfgvalue) { const value = (cfgvalue != null) ? cfgvalue : this.default; const hiddenEl = new ui.Hiddenfield(value, { id: this.cbid(section_id) }); - const outputEl = E('div', { 'style': this.hidden ? 'display:none' : null }); + const outputEl = E('output', { 'style': this.hidden ? 'display:none' : null, + 'for': this.cbid(section_id)}); if (this.href && !((this.readonly != null) ? this.readonly : this.map.readonly)) outputEl.appendChild(E('a', { 'href': this.href })); @@ -4640,7 +4641,7 @@ const CBIButtonValue = CBIValue.extend(/** @lends LuCI.form.ButtonValue.prototyp renderWidget(section_id, option_index, cfgvalue) { const value = (cfgvalue != null) ? cfgvalue : this.default; const hiddenEl = new ui.Hiddenfield(value, { id: this.cbid(section_id) }); - const outputEl = E('div'); + const outputEl = E('output', {'for': this.cbid(section_id)}); const btn_title = this.titleFn('inputtitle', section_id) ?? this.titleFn('title', section_id); if (value !== false) -- 2.30.2