Skip to content

Instantly share code, notes, and snippets.

@stevebosworth
Last active March 21, 2017 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stevebosworth/bd706b9f4ba5f911b2d7a96da602030c to your computer and use it in GitHub Desktop.
Save stevebosworth/bd706b9f4ba5f911b2d7a96da602030c to your computer and use it in GitHub Desktop.
a11y-form-example.liquid
{% form ‘new_comment’, article %}
{{ form.errors | default_errors }}
<label for=”CommentAuthor” class=”hidden-label”>Name</label>
<input {% if form.errors contains 'author' %}class=”error”{% endif %} type=”text” name=”comment[author]” placeholder=”Name” id=”CommentAuthor” value=”{{ form.author }}”>
<label for=”CommentEmail” class=”hidden-label”>Email</label>
<input {% if form.errors contains 'email' %}class=”error”{% endif %} type=”email” name=”comment[email]” placeholder=”email” id=”CommentEmail” value=”{{ form.email }}” autocorrect=”off” autocapitalize=”off”>
{% endform %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment