Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small tweak for accessibility (currently fails two WCAG guidelines) #640

Open
brucelawson opened this issue Sep 1, 2019 · 2 comments

Comments

@brucelawson
Copy link

commented Sep 1, 2019

The sign up form fails Web Content Accessibility Guidelines (WCAG 1.3.1, WCAG 3.3.2) because the input field for the email address isn’t associated with a label. Simply tweak the current code so that the input field is a child of the label element:

Currently:
[label]Email address: [/label]
[input type=”email” name=”EMAIL” placeholder=”Your email address” required=””]

improved:
[label]Email address:
[input type=”email” name=”EMAIL” placeholder=”Your email address” required=””]
[/label]

(Also blogpost here https://www.brucelawson.co.uk/2019/making-mailchimp-for-wordpress-more-accessible/)

@dannyvankooten

This comment has been minimized.

Copy link
Member

commented Sep 5, 2019

Hey @brucelawson,

Thank you for the heads up!

I'm a little hesistant to wrap every input field in label because of the styling implications that would have in many themes, but I'm definitely keen on adding a proper for attribute to every <label> generated by the plugin.

Please allow us some time to properly think of a way to do this. This is a bit complex since every for attribute has to point to a unique ID and we don't know beforehand how many times a form will be printed on a given page (so we have to find a way to dynamically set ID's for each form input).

@dannyvankooten

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Merged #642 which improves the default form content. This does not yet wrap the input field for generated HTML through the field helper though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.