You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using HTML CS with the Section508 ruleset, I got errors for code Section508.undefined.F92,ARIA4:
[HTMLCS] Error|Section508.undefined.F92,ARIA4|li|
|This element's role is "presentation" but contains child elements with semantic meaning.
|<li class="nav__item nav__item--primary" role="presentation">...</li>
The error is correct but its code is very strange – "undefined", and the fact that F92 ARIA4 is WCAG terminology, not Section508. Digging through the code, I see that this is because this particular rule runs regardless of the loaded standard:
Should this check be skipped if the loaded standard is Section508?
Here is a script to reproduce this based on the one from the README:
constpuppeteer=require("puppeteer-core");// Replace with the path to the chrome executable in your file system. This one assumes MacOSX.constexecutablePath="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";// Replace with the url you wish to test.consturl="https://www.rca.ac.uk/";(async()=>{constbrowser=awaitpuppeteer.launch({
executablePath,});constpage=awaitbrowser.newPage();page.on("console",(msg)=>{console.log(msg.text());});awaitpage.goto(url);awaitpage.addScriptTag({path: "node_modules/html_codesniffer/build/HTMLCS.js",});awaitpage.evaluate(function(){HTMLCS_RUNNER.run("Section508");});awaitbrowser.close();})();
The text was updated successfully, but these errors were encountered:
While using HTML CS with the Section508 ruleset, I got errors for code
Section508.undefined.F92,ARIA4
:The error is correct but its code is very strange – "undefined", and the fact that F92 ARIA4 is WCAG terminology, not Section508. Digging through the code, I see that this is because this particular rule runs regardless of the loaded standard:
HTML_CodeSniffer/HTMLCS.js
Lines 291 to 298 in 0be3ec3
Should this check be skipped if the loaded standard is Section508?
Here is a script to reproduce this based on the one from the README:
The text was updated successfully, but these errors were encountered: