Verification error "Bad apple-touch-icon-precomposed value for the rel attribute on the element link: The keyword apple-touch-icon-precomposed is not registered."

I get this error in w3C HTML 5 validator

Row 9, Column 101: Bad value apple-touch-icon-precomposed for rel attribute on element link: keyword apple-touch-icon-precomposed is not registered .... -icon-precomposed "Dimensions =" ​​72x72 "href = "images / sl / touch / m / apple-touch icon.png"> Link type syntax is valid for: A list of links separated by spaces, types listed as allowed in the HTML specification or listed as allowed on microformats wiki

How to fix this error?

+6
source share
3 answers

Ignore him.

If this is the only mistake, then your document is valid HTML5.

Here's what the official (in development) spec points to the <meta> : Extensions to a predefined set of metadata names are possible . I can’t find the area in the spec that talks about the values ​​of the ref tag, but the validator treats them the same way (one for links, one for strings) and points to the Wiki extension . You can register them, but not necessarily. In RFC terminology, this is SHOULD not a MUST .

The specification does not seem to specify a fixed list or use of the Wiki. This may seem strange, since these fields have often evolved over time. It states that compliance inspectors should use the information provided on the WHATWG Wiki MetaExtensions page to determine if a value is allowed or not: values ​​defined in this specification or marked as “proposed” or “ratified” should be accepted. which is an interesting line because it is a specification of HTML Validators, not HTML5 itself, and does not in itself invalidate markup.

In fact, many of these "extensions" are already on the wiki (including yours ), they are simply not accepted. The same thing with many meta tags, even very common ones. It seems many will not be accepted.

I think it’s really nice for the W3C to create a standardized list of them. This helps developers understand what they should use now and in the future (and I hope you can clear some linke elements by reducing the number of ways to specify the creation date from 5+ to 1).

Unfortunately, we are dealing with third parties here (for example, Apple) - and if you do not want to contact every third party that created one of these unofficial specifications, and inform them about the formalization of the specification and send it to the W3C list (which may or cannot be accepted) what should you do? At the end of the day, you still have to support it.

In any case, is it not worthwhile for these HTML elements to support extensions, so vendors do not break the specification by adding new elements to do what is needed?

+4
source

If you move the touch icons to your web root and follow the Apple documentation for naming conventions, you will not actually need to embed link tags in your HTML and avoid these validation errors.

iOS devices will automatically search for icons in the web root using the predefined naming conventions and the correct resolution, as well as here . Good luck.

+3
source

Remove the item from your source.

You probably don't want to do this. Remember that validation is a tool, not a competition.

You may want to edit the wiki of the supported link types, and then wait for the check to complete.

0
source

Source: https://habr.com/ru/post/889455/


All Articles