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

Deal with refNode being set to null in 2_5_3 #275

Open stefanruijsenaars opened 4 years ago

stefanruijsenaars commented 4 years ago

The label might refer to a non-existing element - this currently blows up the checker as refNode will be set to null.

ironikart commented 4 years ago

Hi @stefanruijsenaars, are you able to provide some example code where this fails?

stefanruijsenaars commented 4 years ago

<label for="nonexistent">, where #nonexistent doesn't exist?