luci-base: Replace legend element with h3.

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 <oldium.pro@gmail.com>
This commit is contained in:
Oldřich Jedlička 2020-10-24 19:18:11 +02:00
parent 2df760cbbc
commit ebaa50ecd8

View file

@ -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));