From ebaa50ecd81bdf4888661e1d41ef7e38a1bf3521 Mon Sep 17 00:00:00 2001 From: Oldřich Jedlička Date: Sat, 24 Oct 2020 19:18:11 +0200 Subject: luci-base: Replace legend element with h3. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The legend HTML element is allowed only as first element in fieldset, so use h3 instead, which is rendered the same within themes. Fixes #3149. Signed-off-by: Oldřich Jedlička --- modules/luci-base/htdocs/luci-static/resources/form.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/luci-base/htdocs/luci-static') diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 568a4abb6a..612c8ff944 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -2219,7 +2219,7 @@ var CBITypedSection = CBIAbstractSection.extend(/** @lends LuCI.form.TypedSectio }); if (this.title != null && this.title != '') - sectionEl.appendChild(E('legend', {}, this.title)); + sectionEl.appendChild(E('h3', {}, this.title)); if (this.description != null && this.description != '') sectionEl.appendChild(E('div', { 'class': 'cbi-section-descr' }, this.description)); @@ -3138,7 +3138,7 @@ var CBINamedSection = CBIAbstractSection.extend(/** @lends LuCI.form.NamedSectio }); if (typeof(this.title) === 'string' && this.title !== '') - sectionEl.appendChild(E('legend', {}, this.title)); + sectionEl.appendChild(E('h3', {}, this.title)); if (typeof(this.description) === 'string' && this.description !== '') sectionEl.appendChild(E('div', { 'class': 'cbi-section-descr' }, this.description)); -- cgit v1.2.3