[closed] Meta name="inheadid" is not compliant with HTML5 standards

#1

Whilst doing accessibility and compliance checks I hit an issue with the our FarCry sites and the use of meta name="inheadid". The site is failing checks with the following error:

Bad value 'inheadid' for attribute 'name'. Meta name 'inheadid' is not registered.

I’ve done some research and found that HTML changed the rules for the meta tag:

You can now only use the standard set of names otherwise you need to have your name registered as an extension value. Details are here: https://wiki.whatwg.org/wiki/MetaExtensions

Will Daemon request the inheadid be registered or suggest an alternative existing meta name to be used? From what I can see, the inheadid is heavily used in FarCry.

2 Likes
#2

Core generates the META tag to assist with dynamically updating a page with JS when the source changes.

./core/tags/core/inHead.cfm:
   26    <cfset st = structnew() />
   27    <cfset st["id"] = "inhead-#request.inHead.aCustomIDs[i]#" />
   28:   <cfset st["html"] = chr(13) & '<meta id="inhead-#request.inHead.aCustomIDs[i]#" name="inheadid" content="#request.inHead.aCustomIDs[i]#">' & request.inHead.stCustom[request.inHead.aCustomIDs[i]]>
   29    <cfset arrayappend(aResult,st) />
   30  </cfif>

This generates one or more of these in the HEAD block:

<meta id="inhead-943DB1A0-CEAE-11E4-AA6A005056A670CB" name="inheadid" content="943DB1A0-CEAE-11E4-AA6A005056A670CB">

There’s no particular reason for calling it inheadid – we just need to find a suitable alternative.

Perhaps entity?

entity Allows for definitions of XML-style entities for substitution of references (defined as specially-named elements (e.g., use of data element and/or data-* attribute) or script tags) via inclusion of a JavaScript library. Library also supports inclusion of additional meta element entity definitions via iframe documents.

#3

Sounds like a good match. Also much easier to use an existing one rather than trying to get one registered :smile:

#4

I’ve opted for using the property attribute on <meta> instead of the name attribute which should be fine going forward for HTML5 doctypes. This is fixed in p710 :smile: