obenland / the-bootstrap

A responsive WordPress Theme based on Bootstrap, from Twitter.
http://en.wp.obenland.it/the-bootstrap/
GNU General Public License v3.0
110 stars 46 forks source link

Remove invalid legend tag for w3c validator happiness #53

Closed jmjf closed 11 years ago

jmjf commented 11 years ago

NOTE: This replaces https://github.com/obenland/the-bootstrap/pull/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.

obenland commented 11 years ago

Fixed in aa97c0216d