Bruce Lawson's personal site

Making Mailchimp for WordPress more accessible

I use the free version of the excellent Mailchimp for WP plugin to allow visitors to this site to sign up for my Magical Brucie Mail and get my Reading List delivered to their inboxes.

When I did my regular accessibility check-up (a FastPass with the splendid Accessibility Insights for Web Chromium plugin by Microsoft) I noticed that the Mailchimp signup form fails two WCAG guidelines:

label: Form elements must have labels (1) WCAG 1.3.1, WCAG 3.3.2

This is because the out-of-the-box default form doesn’t associate its email input with a label:

	<label>Email address:</label>
	<input type="email" name="EMAIL"  required />	

I’ve raised an issue on GitHub. Update, 6 Sept: the change was turned down.

Luckily, the plugin allows you to customise the default form. So I’ve configured the plugin to associate the label and input by nesting the input inside the label. (This is more robust than using the IDref way because it’s not susceptible to Metadata partial copy-paste necrosis. (I also killed the placeholder attribute because I think it’s worthless on a single-input form.)

You can do this by choosing “Mailchimp for WP” in your WordPress dashboard’s sidebar, choosing “Form” and then over-riding the default with this:

	<label>Email address: 
	<input type="email" name="EMAIL"  required />

	<input type="submit" value="Sign up" />

And, yay!

(Last Updated on )

Buy "Calling For The Moon", my debut album of songs I wrote while living in Thailand, India, Turkey. (Only £2, on Bandcamp.)

One Response to “ Making Mailchimp for WordPress more accessible ”

Comment by Digitall A11y

Hello Bruce,
The mailchimp form still fails WCAG 2.0… Here the error disappears after you tab out of the form control without filling it… Error should be remaining & when it disappears it is failure of 2.2.1 timing adjustable. Once the user fills the right data & resubmits it should validate again.

Leave a Reply

HTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> . To display code, manually escape it.