luci-compat: Replace legend element with h3.
authorOldřich Jedlička <oldium.pro@gmail.com>
Sat, 24 Oct 2020 17:18:20 +0000 (19:18 +0200)
committerOldřich Jedlička <oldium.pro@gmail.com>
Sat, 24 Oct 2020 17:19:03 +0000 (19:19 +0200)
The legend HTML element is allowed only as first element in fieldset, so
use h3 instead, which is rendered the same within themes.

Fixed #3149.

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
modules/luci-compat/luasrc/view/cbi/nsection.htm
modules/luci-compat/luasrc/view/cbi/nullsection.htm
modules/luci-compat/luasrc/view/cbi/tsection.htm

index faceffeedf95ec0afeb353ec00994034cb79ae20..511a59b6f3b137c5dde66a6b377de283026d5cec 100644 (file)
@@ -1,7 +1,7 @@
 <% if self:cfgvalue(self.section) then section = self.section %>
        <div class="cbi-section">
                <% if self.title and #self.title > 0 then -%>
-                       <legend><%=self.title%></legend>
+                       <h3><%=self.title%></h3>
                <%- end %>
                <% if self.description and #self.description > 0 then -%>
                        <div class="cbi-section-descr"><%=self.description%></div>
@@ -19,7 +19,7 @@
        <% if self.template_addremove then include(self.template_addremove) else -%>
        <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.section%>">
                <% if self.title and #self.title > 0 then -%>
-                       <legend><%=self.title%></legend>
+                       <h3><%=self.title%></h3>
                <%- end %>
                <div class="cbi-section-descr"><%=self.description%></div>
                <input type="submit" class="btn cbi-button cbi-button-add" name="cbi.cns.<%=self.config%>.<%=self.section%>" value="<%:Add%>" />
index 7230719d19b3c591489ae1b1dc6a40fbdacf8b9c..156f29d18ceea787f9cf16f3db9c9f738204adba 100644 (file)
@@ -1,6 +1,6 @@
 <div class="cbi-section">
        <% if self.title and #self.title > 0 then -%>
-               <legend><%=self.title%></legend>
+               <h3><%=self.title%></h3>
        <%- end %>
        <% if self.description and #self.description > 0 then -%>
                <div class="cbi-section-descr"><%=self.description%></div>
index b7718fa0f3cdbc280accb8a9c501fc94856e0f3d..45e51cc69f7230ee2311f7fb63ea7e8c91a2220a 100644 (file)
@@ -1,6 +1,6 @@
 <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
        <% if self.title and #self.title > 0 then -%>
-               <legend><%=self.title%></legend>
+               <h3><%=self.title%></h3>
        <%- end %>
        <% if self.error_msg and #self.error_msg > 0 then -%>
                <div class="cbi-section-error">