HTML_CodeSniffer
HTML_CodeSniffer copied to clipboard
Only report navigation <link> elements outside of head
Related to https://github.com/w3c/wcag/issues/2297
The procedure is to
Check that all link elements pertaining to navigation occur in the head section of the document.
But I can see that we're checking all link
, regardless of their relation to navigation, including rel="stylesheet"
which doesn't make any sense.
https://github.com/squizlabs/HTML_CodeSniffer/blob/aebdff845441ee99252a80d45d65f4ac27f998d7/Standards/WCAG2AAA/Sniffs/Principle2/Guideline2_4/2_4_8.js#L25
Please, consider excluding rel="stylesheet"
or only including rels related to navigation, like Start, Next, Prev, Contents, Index, etc.