<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Travis Miller &#187; HTML5</title>
	<atom:link href="http://www.electrumdigital.com/tag/html5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.electrumdigital.com</link>
	<description>Web Developer for Hire</description>
	<lastBuildDate>Mon, 28 Mar 2011 20:03:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Forms in HTML5</title>
		<link>http://www.electrumdigital.com/2009/10/forms-in-html5/</link>
		<comments>http://www.electrumdigital.com/2009/10/forms-in-html5/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 18:19:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[XHTML & CSS]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.electrumdigital.com/?p=163</guid>
		<description><![CDATA[The HTML5 spec continues to grind inexorably toward publication. I've just spent a while with the latest draft, and at least with respect to forms, I like what I see. Here's a roundup. (Most of these features are in "Last call for comments" status, so it's likely they'll make the final spec, but everything you're [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dev.w3.org/html5/spec/">The <acronym title="HyperText Markup Language">HTML</acronym>5 spec</a> continues to grind inexorably toward publication. I've just spent a while with the latest draft, and at least with respect to <a href="http://dev.w3.org/html5/spec/forms.html#forms">forms</a>, I like what I see. Here's a roundup.</p>
<p><span id="more-163"></span></p>
<p>(Most of these features are in "Last call for comments" status, so it's likely they'll make the final spec, but everything you're about to read is subject to change.)</p>
<ul>
<li>
<p>A couple of the new features are little more than <abbr title="User Interface">UI</abbr> sugar, but they're welcome nonetheless. The <code class="html"><a href="http://dev.w3.org/html5/spec/Overview.html#attr-fe-autofocus">autofocus</a></code> attribute does what it says on the tin. The <code class="html"><a href="http://dev.w3.org/html5/spec/Overview.html#attr-input-placeholder">placeholder</a></code> attribute will display a hint value in a control&#8212;<abbr lang="la" title="exempli gratia">e.g.</abbr>, "you@example.com" in an email field&#8212;which will disappear when the control receives focus.</p>
<p>No more crappy little scripts just to implement these simple <abbr title="User Interface">UI</abbr> behaviors&#8212;a few keystrokes, and you're done!</p>
</li>
<li>
<p>The <code class="html"><a href="http://dev.w3.org/html5/spec/Overview.html#attr-input-autocomplete">autocomplete</a></code> attribute (already implemented by some browsers, including Firefox) will allow us to control whether the browser attempts autocompletion of a particular field. Disabling autocompletion is useful when you don't want a particular value (such as a bank customer's username) to be easily discoverable, or when dealing with a one-time entry (such as a <acronym title="Completely Automated Public Turing Test to Tell Computers and Humans Apart">CAPTCHA</acronym>) where it makes little sense to remember the input value.</p>
<p>Its natural partner is the <code class="html"><a href="http://dev.w3.org/html5/spec/Overview.html#the-list-attribute">list</a></code> attribute, which will allow us to suggest possible values for the control. Presumably user agents will be free to implement this as type-ahead autocompletion (<span lang="fr">&#224; la</span> Google), as a <a href="http://en.wikipedia.org/wiki/Combo_box">combo box</a>, or in any other way they see fit.</p>
</li>
<li>
<p>There's a whole slew of new <code class="html">&lt;input /&gt;</code> types, including <a href="http://dev.w3.org/html5/spec/Overview.html#date-state">calendars</a>, <a href="http://dev.w3.org/html5/spec/Overview.html#color-state">color pickers</a>, <a href="http://dev.w3.org/html5/spec/Overview.html#number-state">numbers</a>, <a href="http://dev.w3.org/html5/spec/Overview.html#e-mail-state">email addresses</a>, and <a href="http://dev.w3.org/html5/spec/Overview.html#url-state"><acronym title="Uniform Resource Locator">URL</acronym>s</a>, among <a href="http://dev.w3.org/html5/spec/Overview.html#attr-input-type">others</a>.</p>
<p>This dovetails nicely with <a href="http://dev.w3.org/html5/spec/forms.html#constraint-validation">the new form validation model</a>, which<br />
(in addition to enforcing syntax for values such as email addresses and <acronym title="Uniform Resource Locator">URL</acronym>s) will allow us to <a href="http://dev.w3.org/html5/spec/Overview.html#attr-input-required">require a value</a>, test it against <a href="http://dev.w3.org/html5/spec/Overview.html#attr-input-pattern">an arbitrary regular expression</a>, and restrict numeric values to <a href="http://dev.w3.org/html5/spec/Overview.html#attr-input-min">a specified range</a> and/or <a href="http://dev.w3.org/html5/spec/Overview.html#attr-input-step">a specified granularity</a>.</p>
</li>
<li>
<p><a href="http://dev.w3.org/html5/spec/interactive-elements.html#menus">Menus</a>, of both the standard and context varieties.</p>
<p>Individual menu items (and buttons, and other <acronym title="User Interface">UI</acronym> elements) will be associated with <code class="html"><a href="http://dev.w3.org/html5/spec/interactive-elements.html#the-command">&lt;command&gt;</a></code> elements. Presumably&#8212;I haven't thoroughly reviewed this part yet&#8212;triggering a menu item or other control will fire a DOM event on the associated command; client-side scripts can register event listeners on the command element, and respond without knowing or caring which element originally triggered the request.</p>
</li>
</ul>
<p>In short, <acronym title="HyperText Markup Language">HTML</acronym>'s role as a document markup language is expanding to include <em>interface</em> markup as well. This is probably as it should be&#8212;there are few pages on the modern web (aside from W3C recommendations and documents repurposed from print) which the existing standards can describe without strain.</p>
<p>Many of the things we now code in JavaScript will be supported natively by browsers&#8212;we'll have to write less code, and users will get a faster, richer, more responsive, and more uniform experience. On the other hand, browsers will continue to grow in size and complexity—especially with the just-in-time JavaScript compilation featured in the latest generation, they're looking less and less like document readers, and more and more like runtime environments for applications.</p>
<p>There will undoubtedly be bugs to contend with in the first generation of <acronym title="HyperText Markup Language">HTML</acronym>5 browsers, but hopefully browser makers have learned the lessons of <acronym title="Internet Explorer 6">IE6</acronym>, and will at least <em>attempt</em> to comply with the spec. We still have a few years before the standard is finalized and widely supported, but (especially once <acronym title="Cascading Style Sheets Level 3">CSS3</acronym> follows suit) it's going to offer some interesting possibilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.electrumdigital.com/2009/10/forms-in-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

