The checked attribute in the HTML5 spec is a boolean property. If it exists, it's true. It's false if it doesn't exist.
You should be using the selected attribute in XF template syntax to evaluate conditions which will add the checked attribute only if the condition evaluates to true.