[whatwg] Context help in Web Forms

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