Went through a quick W3C validation and got an error because a label was used for markup & not to associate with a form element.
I tried to track down the space where this is inserted into the form block, but it was taking too much time:
<label for="edit-mailchimp-lists-mailchimp-1-title">My Newsletter </label>
That really should be something like:
<h3>My Newsletter</h3>
or even:
<strong>My Newsletter</strong>
This should be a simple thing to clean up to ensure that the markup is semantically correct.
Comment | File | Size | Author |
---|---|---|---|
#4 | remove-label.patch | 749 bytes | Everett Zufelt |
Comments
Comment #1
mgiffordJust ran my site through - http://validator.w3.org/nu/
And of course it complained as this isn't valid markup.
Comment #2
Everett Zufelt CreditAttribution: Everett Zufelt commentedI took a look in 7.x-2.x, the string 'My Newsletter', does not exist. Can you please provide more context about where this is displayed? Are you using the mailchimp_lists sub-module? This is the only place that I find the string 'Newsletter'.
Comment #3
mgiffordGood example is on our home page & the subscription block - http://openconcept.ca/
I've pasted in more than is required, but the OC Newsletter label points to the div "edit-mailchimp-lists-mailchimp-1-title" which is just wrong.
Comment #4
Everett Zufelt CreditAttribution: Everett Zufelt commentedAttached patch removes the label an a couple of unnecessary t() calls. I haven't tested this code, but it should work fine.
Comment #5
mgiffordThis works, but think that
'#description' => check_plain($list->description),
should be bold. It should have some markup which differentiates it from plain text (just as the label tag did).I can confirm that this works though to remove the label and I've applied it to the site above.
Comment #6
levelos CreditAttribution: levelos commentedFixed with a slightly different approach. Thanks for pointing it out.
Comment #7
mgiffordLooking forward to seeing it in the next release. Thanks.