Won't fix autofocus="true" instead of autofocus="autofocus"


Well-known member
Just a little syntax thing.. I see sometimes autofocus="true" in templates.
"autofocus" is boolean attribute, so it should has no value, or autofocus="autofocus"

Per spec
2.5.2 Boolean attributes
If the attribute is present, its value must either be the empty string or a value that is an ASCII case-insensitive match for the attribute's canonical name, with no leading or trailing whitespace.
Note: The values "true" and "false" are not allowed on boolean attributes. To represent a false value, the attribute has to be omitted altogether.


XenForo developer
Staff member
This is a legitimate report and it's something we will change over time, but I don't think it's worth doing in bulk right now as it does affect a number of templates. This should just be a "correctness" thing, unless there are browsers that handle this incorrectly now (I think they all work as expected). As such, leaving it won't cause any issues.

So while I'm technically tagging this "won't fix", it will be changed over time, but I don't think it's worth changing all the templates that currently contain this for the sake of spec correctness.