Remove invalid legend tag for w3c validator happiness #53

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

Contributor
jmjf commented Apr 7, 2013

NOTE: This replaces #48 and is more complete.

The html legend tag is only valid inside a fieldset tag (http://www.w3.org/TR/html-markup/legend.html).

In the-bootstrap, the legend tag was used outside a fieldset to style "Leave a Reply" on the comment form. I added a legend class style to style.css (and style.min.css) and changed functions.php to write a span with the class.

The legend tag was also used outside a fieldset to style the "password required" text for a password protected post. I changed functions.php to put the text in a p before (correction as I'm writing the pull: inside) the form styled with class post-password-legend and modified style.css (and style.min.css) to replace .post-password-form legend with post-password-legend. According to W3C, the p tag is allowed in forms. ("A form can contain text and markup (paragraphs, lists, etc.) in addition to form controls." in section http://www.w3.org/TR/html401/interact/forms.html#edef-FORM -- I tried a span but it wouldn't take margin properly.)

Tested on localhost and styled to match existing the-bootstrap appearance.

@jmjf jmjf Remove invalid legend tag
The html legend tag is only valid inside a fieldset tag
(http://www.w3.org/TR/html-markup/legend.html).

In the-bootstrap, the legend tag was used outside a fieldset to style
"Leave a Reply" on the comment form. I added a legend class style to
style.css (and style.min.css) and changed functions.php to write a span
with the class.

The legend tag was also used outside a fieldset to style the "password
required" text for a password protected post. I changed functions.php to
put the text in a p before the form styled with class
post-password-legend and modified style.css (and style.min.css) to
replace .post-password-form legend with post-password-legend. According
to W3C, the p tag is allowed in forms. ("A form can contain text and
markup (paragraphs, lists, etc.) in addition to form controls." in
section http://www.w3.org/TR/html401/interact/forms.html#edef-FORM)

Tested on localhost and styled to match existing the-bootstrap
appearance.
78c9174
Owner
obenland commented Apr 7, 2013

Fixed in aa97c02

@obenland obenland closed this Apr 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment