
I'm getting a crazy set of errors. I'm using Bootstrap code and have not edited it. So why is this showing an error?
A
linkelement with asizesattribute must have arelattribute that contains the valueiconor the valueapple-touch-icon.
…
Bad value
bannerfor attributeroleon elementnav.
To see the same thing live, go to https://validator.w3.org/nu and enter: www.iqtests4kids.com/
Maintainer of the W3C HTML checker (validator) here. The rel=apple-touch-icon-precomposed error is because I recently updated the checker to conform to HTML spec requirements for sizes:
The
sizesattribute is used with theiconlink type. The attribute must not be specified onlinkelements that do not have arelattribute that specifies theiconkeyword or theapple-touch-iconkeyword.
About the error for role=banner on nav, that’s because the checker conforms to requirements in the ARIA in HTML spec that nav must not have any role other than navigation.
But note that the ARIA in HTML spec also states the following requirement:
Web developers should not set the ARIA
roleandaria-*attributes to values that match the implicit ARIA semantics defined in the table.
And requirements in “the table” cited state that the implicit semantics of nav are navigation.
Therefore, if you use role=navigation with nav, the checker will emit a warning.
So bottom line is, per the ARIA in HTML requirements, nav should never have an explicit role.
Looks like the Validator is happier with:
<link rel="apple-touch-icon".....
instead of
<link rel="apple-touch-icon-precomposed"......
And for the other error, you can make the Validator happy by altering the offending role="banner" setting to "role=navigation":
<nav id="main-menu" ..... role="navigation">
either leaving it in and living with the resulting 'Warning' or omit the value completely (the best solution) and the Validator will be happy :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With