HTML5 and CSS3, Second Edition

(singke) #1
Imagine, though, if each website used the HTML5 date field, and the browser
had to create the interface. Each site a user visited would display the exact
same date picker. Screen-reading software could even implement a standard
mechanism to allow the blind to enter dates easily. We covered quite a few
new form fields in this chapter, but we didn’t cover all of them. We can use
the search type for search boxes, the tel type for telephone numbers, and the
time and datetime types for times and dates with times, respectively. All of these
field types can present specific user interfaces to our visitors, and they describe
the content much better than plain-old text types.

Now think about how useful placeholder text and autofocus can be for users
once it’s everywhere. Placeholder text can help screen readers explain to users
how form fields should work, and autofocus could help people navigate more
easily without a mouse, which is handy for the blind, but also for users with
motor impairments who may not use the mouse.

Once more browsers support the built-in validation features, users will have
the same experience across pages; error messages will be consistent, and
users won’t be looking around to figure out where they made mistakes.

The ability for developers to turn any element into an editable region makes
it easy to do in-place editing, but it could change how we build interfaces for
content-management systems.

The modern Web is all about interactivity, and forms are an essential part of
that interactivity. HTML5’s enhancements give us a whole new set of tools
we can employ to help our users.

Chapter 3. Creating User-Friendly Web Forms • 66


Download from Wow! eBook <www.wowebook.com> report erratum • discuss

Free download pdf