squizlabs / HTML_CodeSniffer

HTML_CodeSniffer is a client-side JavaScript application that checks a HTML document or source code, and detects violations of a defined coding standard. Comes with standards that cover the three conformance levels of the W3C's Web Content Accessibility Guidelines (WCAG) 2.0 and the U.S. Section 508 legislation.
https://squizlabs.github.io/HTML_CodeSniffer/
BSD 3-Clause "New" or "Revised" License
1.12k stars 246 forks source link

Add HTML_CodeSniffer as an ACT implementation for W3C #312

Open WilcoFiers opened 1 year ago

WilcoFiers commented 1 year ago

I was wondering if it HTML_CodeSniffer community would be interested to see this tool added to the W3C's list of ACT implementations. This is a list of test tools and methodologies that test for WCAG 2 and/or ARIA.

In summary, the Accessibility Conformance Testing (ACT) project is a W3C effort to try and reduce inconsistencies between, and improve transparency of accessibility testers. To accomplish this, the W3C has created various rules that define how to apply WCAG success criteria to HTML, CSS and ARIA. Each rule comes with a number of examples / test cases, that can be used to determine whether different tools / testing solutions get the results expected from the rule.

Since HTML CS is an important and heavily used tool for accessibility testing, I think having it on the list would be great. This will help give insight into the capabilities of HTML_CodeSniffer. What kinds of things does it find; and what doesn't it find. This is also useful for future development of HTML CS, by giving examples for cases that HTML CS hasn't covered yet.

I created a preview of what this might look like for HTML_CodeSniffer. This was done by running HTML CS against the 1000+ test cases ACT has, and programmatically comparing the results to the expected results. Please note this is not live, nor will this be indexed. https://deploy-preview-176--wai-wcag-act-rules.netlify.app/standards-guidelines/act/implementations/htmlcs/

Some things of note:

Additional resources:

Lastly, if the HTML CS community is not interested I can easily remove these pages. I don't think there is anything sensitive in the work I did, but if there is let me know.

mgifford commented 1 year ago

Aligning with the W3C's ACT Rules would be a big plus for htmlcs!