HTML_CodeSniffer icon indicating copy to clipboard operation
HTML_CodeSniffer copied to clipboard

Only report navigation <link> elements outside of head

Open Maxim-Mazurok opened this issue 2 years ago • 0 comments

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.

Maxim-Mazurok avatar Apr 05 '22 14:04 Maxim-Mazurok