Re: HTML5 custom meta element name attribute values should be a warning

Ryan Foster <rrf5000@psu.edu>, 2011-08-08 10:37 -0400:

> While validating some HTML Doctyped as HTML5 with the W3C Markup Validator
> (http://validator.w3.org), I came across the following error:
> 
> Line 6, Column 35: Bad value version for attribute name on element meta:
> Keyword version is not registered. 
> 
> <meta name="version" content="1.0">
> 
> Line 7, Column 52: Bad value support-email for attribute name on element
> meta: Keyword support-email is not registered. 
> 
> <meta name="support-email" content="test@email.com">
> 
> I believe this is the relevant section of the HTML5 spec:
> http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#o
> ther-metadata-names

Right. That section specifies that keywords are only valid if they are
registered. and "support-email" is not registered.

As the full error message emitted by the validator indicates, you can
register metadata names on the WHATWG wiki yourself.

  http://wiki.whatwg.org/wiki/MetaExtensions

> When I validate using the HTML 4.01 Strict Doctype, the errors aren't there.
> Is there a reason that this warrants an error instead of a warning?

The reason is that the HTML5 spec has more requirements on attribute values
than the HTML4 spec does, with the rationale generally being that alerting
users to bad and/or irrelevant attribute values is a good thing.

In the case of the "support-email" name value, if there is no spec that
defines what "support-email" means, then it's less likely that there are
any public consuming applications that actually process it and do anything
useful with it interoperably, and we want you to know that. It's then up to
you to do whatever you want with that knowledge.

> Is this an issue with the HTML specification(s) or with the W3C
> Validator?

It's a requirement in the HTML5 spec. If you disagree that it should be a
requirement, the way to let that be known would be to file a bug against
the HTML5 spec:

  http://www.w3.org/Bugs/Public/enter_bug.cgi?product=HTML%20WG&component=HTML5%20spec%20(editor:%20Ian%20Hickson)&priority=P3

  --Mike

-- 
Michael[tm] Smith
http://people.w3.org/mike/+

Received on Monday, 8 August 2011 15:48:33 UTC