The WHATWG Blog

Please leave your sense of logic at the door, thanks!

Archive for the ‘Forms’ Category

Google Tech Talk: HTML5 demos

Friday, September 26th, 2008

I gave a talk at Google on Monday demonstrating the various features of HTML5 that are implemented in browsers today. The video is now on YouTube, so now you too can watch and laugh at my lame presentation skills!

The segments of this talk are as follows. Some of the demos are available online for you to play with and are linked to from the following list:

  1. Introduction
  2. <video> (00:35)
  3. postMessage() (05:40)
  4. localStorage (15:20)
  5. sessionStorage (21:00)
  6. Drag and Drop API (29:05)
  7. onhashchange (37:30)
  8. Form Controls (40:50)
  9. <canvas> (56:55)
  10. Validation (1:07:20)
  11. Questions and Answers (1:09:35)

If you're very interested in watching my typos, the high quality version of the video on the YouTube site is clear enough to see the text being typed. More details about the demos can be found on the corresponding demo page.

Posted in Browser API, Browsers, Conformance Checking, DOM, Elements, Events, Forms, Multimedia, Syntax, WHATWG | 7 Comments »

Web Forms 2.0 Cross-Browser Implementation

Monday, August 20th, 2007

A cross-browser implementation of Web Forms 2.0 has been released. The W3C HTML Working Group is now reviewing the Web Forms 2.0 specification to serve as a basis for the next version HTML (as everyone knows). Some discussion on the HTML WG mailing list regarding the WF2 specification has been at times ignorant of the content of the specification and what it actually enables authors to do. Hopefully by using this implementation and examining its associated test suite, the meaning of the specification will be clarified, and members of the HTML WG will be more educated so as to more constructively review it.

I started work on this project with an standalone implementation of the repetition model, but I have since expanded it to include other WF2 features as well. I developed this library on the job for incorporation into the various development projects I was working on; I have found the functionality provided by WF2, especially the repetition model and the form validation model, to greatly ease development. Try using it in your own projects and see for yourself, and then drop a line to WHATWG and the HTML WG with your feedback on what works well and what needs to be improved.

This implementation works in Firefox 1+, MSIE 6+, and Safari 2+ (Opera, of course, has a native implementation). For more information on the implemented features, see the implementation details. This implementation will follow the HTML 5 specification that evolves from the work done by the HTML Working Group.

Posted in Forms | 1 Comment »

fieldsets need legends

Thursday, March 8th, 2007

this post refers to the "Write" interface from WordPress utilized to post comments to WHATWG blogs.

there is well-intentioned, but mis-implemented markup in the edit form; namely, improper implemetation of the FIELDSET.

for a proper FIELDSET, one needs to do 4 things:

  1. open the FIELDSET (which this form does)
  2. define a LEGEND for the FIELDSET (which this form does NOT); the natural candidates for LEGEND are the level 3 headers (H3) classed dbx-handle so instead of repeatedly hearing "click to open this box", i would also get the pseudo-box (which i would call sub-forms) LEGEND as an indicator of what i am about to open or close. i would also make the alt text device independent - instead of "click here to open this box", i would propose "show sub-form" and "hide sub-form"
  3. bind individual FORM controls to their textual labels by use of the LABEL element and the for/id mechanism that ties the form control (which takes the "id") to a LABEL (which takes the "for") or multiple labels; the LABEL should contain the actual, textual label, and NOT the FORM control, as in this form; this form has the attribute set set correctly to bind the LABEL to the FORM control, but since the LABEL element is opened PRIOR to the INPUT element, no labeling is available to the user - in my case (i use a screen-reader) the sub-forms that appear when one opens a FIELDSET to reveal a FORM appear unlabeled to my screenreader, because of invalid markup.
  4. close the FIELDSET (which this form does)

Posted in Forms, WHATWG | 10 Comments »

Proposing URI Templates for WebForms 2.0

Thursday, January 11th, 2007

I recently had an off-list email conversation with Ian Hickson about the possibility of adding URI Template support to the FORM element in WebForms 2.0. I've documented our conversation and my response to his suggestion to use server-side direct or Javascript instead over at the Well Designed URL Initiative blog. However, I've provided some examples of what I'm proposing below:

<form 
  action="http://foo.com/model"
  template="http://foo.com/{make}/{model}/"
  method="get">
  <input type="text" name="make" />
  <input type="text" name="mode" />
  <input type="submit" />
</form>
<form
  action="http://www.myblog.com/topic"
  template="http://www.myblog.com/{topic}/"
  method="post">
  <select name="topic">
    <option value="first">My 1st Post</option>
    <option value="second">My 2nd Post</option>
    <option value="third">My 3d Post</option>
  </select>
  <input type="text" name="comment">
  <input type="submit">
</form>
<form 
  action="http://blog.whatwg.org/topic"
  template="http://blog.whatwg.org/{topic}"
  method="post">
  <select name="topic">
    <option value="feed-autodiscovery">
       Feed Autodiscovery
    </option>
    <option
value="text-content-checking">
        textContent Checking
    </option>
    <option value="checker-bug-fixes">
        Bug Fixes
    </option>
    <option
        value="significant-inline-checking">
        Significant Inline Checking
    </option>
    <option value="charmod-norm-checking">
        Charmod Norm Checking
    </option>
    <option
value="proposing-features">
        Proposing features
    </option>
  </select>
  <input type="submit">
</form>

One point I made on the WDUI blog that I also I want to make here is that is seems from my time on the REST-discuss list that many of the REST experts tend toward using (what I call well-designed URLs, i.e. URLs where the resource is identified by path instead of query string. With WebForm 2.0's pending support of PUT and DELETE, it would be just short of a crime not to include support for posting to clean URLs in WebForms 2.0.

So I really hope that Ian and the WHATWG can see their way clear to consider adding this feature to WebForms 2.0. And if the main issue with it is needing to have it written up for inclusion in the spec, I'm more than happy to help.

Posted in Forms | 9 Comments »