Add a custom validator looking for {required,checked}={true,false}
attributes. This found numerous cases.
Add an html_attrs method that handles required/checked attributes
properly, skipping them if the value is false, and using them
without a value if the value is true.
Change all attribute handling to use html_attrs to fix the issue.