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

Angular Material autocomplete attribute causes HTML_CodeSniffer to not load errors/warnings #296

Open OurFinalBow opened 3 years ago

OurFinalBow commented 3 years ago

When using the following code the code sniffer gets stuck trying to load results (infinite load spinner):

            <mat-form-field class="fieldCCNumber" appearance="outline">
                <mat-label>Card Number</mat-label>
                <input matInput autocomplete="cc-number" id="cc-number" required>
            </mat-form-field>

When I remove the autocomplete="cc-number" it works fine and returns results. However, the autocomplete is needed for the credit card autofill to work with the angular material.

osimblahan commented 1 year ago

I have a similar issue, I narrowed it down to the translation file keys not matching the ones used in the rule. This caused it to error.

1_3_5_H98.InvalidAutocomplete_Text in en.js vs 1_3_5_H98.InvalidAutoComplete_Text in 1_3_5.js