1 / 186

Falling in Love with Forms [Accessibility Summit 2014]

Forms. Without them, the web would not be what it is today, but they are challenging from a markup and styling standpoint. <br><br><br>In this session, we will explore forms from top to bottom, examining how they work and how their components can be incorporated with other elements to maximize accessibility, improve semantics, and allow for more flexible styling. You’ll get to see the complete picture with forms, including <br><br>* new HTML5 field types; <br>* validation, error messages & formatting hints; <br>* how to mark up and style forms for the greatest flexibility in responsive designs; and <br>* best practices for enhancing forms with JavaScript.

Download Presentation

Falling in Love with Forms [Accessibility Summit 2014]

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FALLING IN LOVE WITH FORMS Aaron Gustafson @AaronGustafson slideshare.net/AaronGustafson

  2. Forms suck.

  3. They are incredibly tedious to create.

  4. They are undeniably
 annoying to fill in.

  5. They can be frustrating to test.

  6. They require logic.

  7. Forms suck.

  8. can Forms suck.

  9. don’t have to Forms suck.

  10. can Forms suck. a lot less

  11. Forms can be… easy to build predictable effortless to use and accessible

  12. It’s all in how you look at them.

  13. HELPFUL HINT Break large,
 complex forms into smaller, simpler, reusable patterns

  14. How about a
 common example? Let’s look
 at a contact form.

  15. webstandardssherpa.com/contact

  16. webstandardssherpa.com/contact

  17. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field Your Name <input type=“text” name=“full_name”>

  18. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field Your Name <input name=“full_name”>

  19. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field Your Name <input name=“full_name”/>

  20. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field Your Name <input name=“full_name”>

  21. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field <label>Your Name</label> <input name=“full_name”>

  22. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field <label for=“full_name”>Your Name</label> <input id=“full_name” name=“full_name”>

  23. FALLING IN LOVE WITH FORMS Pattern 1: Label & Field <label for=“full_name”>Your Name</label> <input id=“full_name” name=“full_name” required>

  24. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input id=“email” name=“email” required> We will only use your email address to respond to your message.

  25. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input id=“email” name=“email” required> We will only use your email address to respond to your message. !

  26. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input id=“email” name=“email” required> We will only use your email address to respond to your message. !

  27. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required> We will only use your email address to respond to your message. !

  28. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required> We will only use your email address to respond to your message. !

  29. Progressive Enhancement

  30. Technological
 restrictions

  31. User Experience BASIC ADVANCED Browser Capabilities

  32. User Experience BASIC ADVANCED Browser Capabilities Content

  33. User Experience Interactivity Accessibility Design BASIC ADVANCED Browser Capabilities Semantics Content

  34. User Experience JavaScript ↖ {} CSS BASIC ADVANCED <> Browser Capabilities HTML ¶ Text & HTTP

  35. HTML

  36. ARIA HTML5 HTML HTML4

  37. Browsers ignore what they don’t understand

  38. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required> <em> We will only use your email address to respond to your message. </em>

  39. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required> <em class=“note”> We will only use your email address to respond to your message. </em>

  40. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required aria-describedby=“email-note”> <em class=“note” id=“email-note”> We will only use your email address to respond to your message. </em>

  41. FALLING IN LOVE WITH FORMS Pattern 2: Label, Field & Note <label for=“email”>Your Email</label> <input type=“email” id=“email” name=“email” required aria-describedby=“email-note”> <em class=“note” id=“email-note”> We will only use your email address to respond to your message. </em> Screen Reader: Chrome Vox

  42. FALLING IN LOVE WITH FORMS Rinse & Repeat <label for=“subject”>Purpose of Your Message</label> <select id="subject" name="subject"> <option>Question/Comment</option> <option>Article Error</option> <option>Website Bug Report</option> <option>Ask the Sherpas a question</option> </select>

  43. FALLING IN LOVE WITH FORMS Rinse & Repeat <label for=“message”>Your Message</label> <textarea id="message" name="message"></textarea>

  44. FALLING IN LOVE WITH FORMS Buttons <input type=“submit” value=“Send My Message”>

  45. FALLING IN LOVE WITH FORMS Buttons <button type=“submit”>Send My Message</button>

  46. HELPFUL HINT A button element can contain pretty much anything ! (within reason)

  47. FALLING IN LOVE WITH FORMS Buttons <button type="submit" value=“basic"> <h3>Basic Plan</h3> <p>You get 20 <abbr title="gigabytes">GB</abbr> of storage and a single domain name for <strong>$2.99 <abbr title=“per month”>/mo</abbr></strong></p> </button>

  48. That new email field looks cool, can we see more of that fancy HTML5 stuff?

  49. FALLING IN LOVE WITH FORMS Requesting URLs <label for=“url”>URL</label> <input type=“url” id=“url” name=“url” required aria-describedby=“url-note” > <em class=“note” id=“url-note”> Please provide the URL for the specific page that includes the area you want reviewed. </em>

  50. FALLING IN LOVE WITH FORMS Requesting URLs <label for=“url”>URL</label> <input type=“url” id=“url” name=“url” required aria-describedby=“url-note” > <em class=“note” id=“url-note”> Please provide the URL for the specific page that includes the area you want reviewed. </em>

More Related