HTML and CSS Reference
In-Depth Information
Provide a fallback when needed
A lot of material in this chapter is quite new and may not work in all browsers. Thank-
fully, input types will usually degrade to regular text fields when a particular input type
is not supported. But this can still have serious consequences for the usability of your
form if you designed it with all the rich controls that are in the HTML5 specification
but didn't consider what it would look like in an older browser. Investigate projects like
Modernizr ( ) , jQueryUI ( ) ,
and webforms2 ( ) because these
projects will help you with implementing “polyfills” into your site, meaning they
provide (through JavaScript) functionality that you would expect to be natively available
in the browser.
It is fairly easy to create forms—just insert a couple of input tags, add a bit of text,
slap a submit button on the end, and then you get to go home early—but it is a lot
harder to create forms that are usable, accessible, and logical. Think about the meaning
of your form content. What schematic elements make sense for use as input? These are
not things that should be left to the last minute. Your form may be the most important
part of your website, particularly if it's a form that allows people to enter their credit card
details, so it should be a model of simplicity and ease of use. It should not upset people,
anger them, or put them off—it seems odd to have to say that, but I've seen some terrible
forms in my time that did just that. Lastly, be prepared for the reality that to create the
ultimate usable form, you'll invariably have to turn to JavaScript or server-side code (or
both) to help you provide users with the expected features of modern web forms.
Search WWH ::

Custom Search