Open Federico-G opened 9 years ago
Unless you're seeing the widget misbehave somehow, you're fine; the error is a false-positive.
Probably the E021 code should use :checked
instead of [checked]
in its selectors, assuming that works properly in Cheerio.
Bootlint was originally designed to check the initial rendered HTML of a webpage, rather than the live DOM after having interacted with the webpage. Although there's no philosophical reason not to make it work in both cases if feasible.
PROBLEM:
I have this when my page loads:
This don't cause any errors, but when I click in one of them, the label now has the class .active which causes E21 error(https://github.com/twbs/bootlint/wiki/E021). I don't know if I'm making something wrong or if it's a bug. I read the docs and the examples are only with "checked" with no .active but no vise-versa.
DOCS:
.active
class used without thechecked
attribute (or vice-versa) in a button group using the button.js pluginWrong:
Right: