[whatwg] Markup for Web Forms 2.0 that still requires discussion
Matthew Raymond
mattraymond at earthlink.net
Sun Jul 4 18:58:04 PDT 2004
=== Elements ===
1) The <datalist> element.
This element is a container for <option> elements, and is used in
the creation of drop-down lists via the use of the |list| attribute.
(See the Attributes section.) Similar to the <select> element in most
user agents, all children of the <datalist> element that are not
<option> elements will be ignored by a WF2-compliant user agent.
Example:
<input type="text" name="combo" list="myList">
<datalist id="myList">
<label> or select from the list:</label>
<select name="combo">
<option>Item 1</option>
<option>Item 2</option>
<option>Item 3</option>
</select>
</datalist>
I disapprove of this tag for two reasons. The first is that it
depends on abusive markup for it to properly degrade in a legacy UA. The
second reason is that you can accomplish the same thing using the ignore
attribute without introducing a new element.
=== Attributes ===
1) The |data| attribute.
I think we've all agreed about this one. I don't recall hearing an
objection to it. This attribute is used to load list items into a
<select> or <datalist>.
Example:
<select id="myList" name="combo" data="dropdown.xml">
2) The |ignore| attribute.
The |ignore| attribute is an idea I came up with but haven't gotten any
replies on. A tag with this attribute set to "true" will not be rendered
and any associated scripting will not run. The same is true for all
children of the tag. As a result, the attribute turns its respective
element and all its children into something similar to a comment, except
that all the elements affected remain in the DOM. Changing this
attribute to "false" (the default value) will effectively "uncomment"
the element and all its children.
Example:
<script language="ECMAScript" src="nonWF2.js" ignore="true"></script>
3) The |list| attribute.
I think we've all agreed about this one as well. Generally, this is an
attribute for the <input> element that contains the ID of a list of
options that will be used as a drop-down menu associated with the <input>.
Example:
<input type="text" name="combo" list="myList">
<label ignore="true" > or select from the list:
<select id="myList" name="combo">
<option>Item 1</option>
<option>Item 2</option>
<option>Item 3</option>
</select>
</label>
More information about the whatwg
mailing list