W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2008

[whatwg] Context help in Web Forms

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 5 Aug 2008 20:44:13 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0808052041580.5140@hixie.dreamhostps.com>
On Mon, 2 Jun 2008, Matthew Paul Thomas wrote:
> 
> The disadvantage of using a data-* attribute is that more kinds of 
> mistakes would be undetectable by a validator. It would have no idea 
> that (a) the value of the attribute must be the ID of an element 
> elsewhere in the document, and (b) each value must be unique within the 
> document.
> 
> I wonder if the data-* attribute naming scheme could be classified 
> somehow to allow basic type checking like this. I expect there will be 
> other cases where authors want an attribute value to match the ID of an 
> element in the page.

On Tue, 3 Jun 2008, Henri Sivonen wrote:
> 
> I don't like the idea of trying to encode the datatypes of data-* 
> attributes in a validator-sensitive way. What datatypes would a 
> validator support for data-* attributes? The HTML5 datatype library used 
> by Validator.nu already contains 41 datatypes, but people will likely 
> want to have others. The whole point of data-* is to provide a place 
> where a validator doesn't go without authors having to abuse e.g. title 
> which is a freeform but exposed to humans.
> 
> The foreseeable problem with data-* is, of course, that microformat-like 
> activity will happen there instead of going through the trouble of 
> getting unprefixed validator-sensitive attributes minted with community 
> review in the WHATWG and the HTML WG.

On Wed, 4 Jun 2008, Anne van Kesteren wrote:
> 
> That'd be wrong as data-* does not allow implementation by UAs... Having 
> said that, if we don't make it clear what the idea is that might end up 
> happening in practice here and there.

I agree that not constraining data-* will lead to a validation "hole" 
where people can't check that their data is matching their presumed 
schema, but I think the right solution to this is for validators to offer 
out-of-band ways to specify schemas for data-* attributes, not for the 
spec to constrain the values, IMHO.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 5 August 2008 13:44:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:04 UTC