1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Resolved Bug Reports' started by rellect, Oct 10, 2015.

  1. rellect

    rellect 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
    HTML:
    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.
     
    Yoskaldyr likes this.
  2. Mike

    Mike 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.
     
    rellect likes this.

Share This Page