WordPress.org

Ready to get started?Download WordPress

Forums

Captcha
[resolved] required attribute missing by the INPUT tag, INPUT is not paired! (4 posts)

  1. crysman
    Member
    Posted 9 months ago #

    There should definitelly be the required attribute present by the INPUT field, because it IS required.

    This way HTML5 compliant browsers would not let the user incorrectly submit the form without filled-in value in the CAPTCHA input field.

    Currently, there is this code:

    <input
    id="cptch_input"
    type="text"
    style="width:20px;margin-bottom:0;display:inline;font-size: 12px;width: 30px;"
    aria-required="true"
    size="2"
    maxlength="2"
    value=""
    name="cptch_number"
    autocomplete="off">
    </input>

    Also, INPUT tag is NOT a pair tag! - see the fix below:

    The FIX:

    <input
    id="cptch_input"
    type="text"
    style="width:20px;margin-bottom:0;display:inline;font-size: 12px;width: 30px;"
    size="2"
    maxlength="2"
    value=""
    name="cptch_number"
    autocomplete="off"
    aria-required="true"
    required="required"
    />

    some additional info see here (if you like):
    1) INPUT tag is not a paired tag:
    http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.4
    2) the required attribute:
    http://diveintohtml5.info/examples/input-required.html
    3) what is the "aria-required" attribute?
    http://developer.yahoo.com/blogs/ydn/define-required-inputs-aria-html5-53573.html

    http://wordpress.org/plugins/captcha/

  2. bestwebsoft
    Member
    Plugin Author

    Posted 9 months ago #

    Hi crysman,

    HTML5 standard hasn't been carried so far. That's why we develop our plugins for XHTML 1.1. standard and if the attributes you are talking about are added, the plugin's code won't be valid. That's why we won't add them.

    Sincerely,
    Support team

  3. crysman
    Member
    Posted 9 months ago #

    OK, if you don't consider to have a HTML5 version, I understand.

    But still you could code the input as non-paired, because it would still be XHTML (1.0) valid and no changes for HTML5 would be required. Also, it would let us - all the developers using HTML5 - have a valid HTML markup.

    When you are argumenting with "XHTML 1.1"... are you sure your current code is this spec valid?

    See the output from the http://validator.w3.org/ :

    Validation Output: 5 Errors
    there is no attribute "aria-required"
    there is no attribute "autocomplete"
    document type does not allow element "input" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "address", "fieldset" start-tag
    end tag for "form" which is not finished

    As you see, you are currently using XHTML 1.1 invalid arguments, so why not to include the required attribute which would help a lot?

    Last 2 errors are caused by missing FIELDSET tag... Also invalid.

    I really don't get it...
    #crysman

  4. bestwebsoft
    Member
    Plugin Author

    Posted 9 months ago #

    Hi again,

    We will make the necessary changes in the near future.

    Sincerely,
    Support Team

Reply

You must log in to post.

About this Plugin

About this Topic