• Resolved Kev Provance

    (@kprovance)


    Hey folks,

    This popped up with a MailChimp form when running my site through the W3C validator:

    Attribute autocorrect not allowed on element input at this point.

    
    <form id="mc4wp-form-1" class="mc4wp-form mc4wp-form-26" method="post" data-id="26" data-name="Text" >
    <input type="hidden" autocomplete="off" autocorrect="off" name="VR-l-HC-vmTJAq-pDD" value="" />
    <div class="mc4wp-form-fields">
    <!-- my fields removed for space -->
    </div><label style="display: none !important;">Leave this field empty if you're human: <input type="text" name="_mc4wp_honeypot" value="" tabindex="-1" autocomplete="off" /></label><input type="hidden" name="_mc4wp_timestamp" value="1528340124" /><input type="hidden" name="_mc4wp_form_id" value="26" /><input type="hidden" name="_mc4wp_form_element_id" value="mc4wp-form-1" /><div class="mc4wp-response"></div></form>
    

    Any chance we can get rid of that attribute?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Lap

    (@lapzor)

    Hi,

    Because you marked your thread as “not a support question” we did not look into this yet.

    That hidden field is not generated by our plugin, so I can’t help with that.

    Thread Starter Kev Provance

    (@kprovance)

    But isn’t it though? I did a search of the plugin code for ‘autocorrect’. Here you go (FYI – I am a theme and plugin dev to, so I know a little bit about these things. I am not trying to waste anyones time, I just want to know if we can get rid of this attribute on an input where it does not belong, for W3C validation reasons.

    It looks like these things are being set in forms-admin.js

    function disableBrowserMagic(field, spellcheck) {
      field.setAttribute("autocorrect", "off");
      field.setAttribute("autocapitalize", "off");
      field.setAttribute("spellcheck", !!spellcheck);
    }

    I mean, I guess I could fix this so it does not affect input text fields with some extra if/then statements. I have not tried to debug it yet. I was hoping the author would look into it before I had to.

    Thanks.

    Thread Starter Kev Provance

    (@kprovance)

    Oh, I see this is a Git. Let me see if I can play with this and figure it out. I’ll submit a pull request if I can. This plugin is ships with my theme, and I get questions about the validation from time to time. ??

    I think we still use it with Redux too.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Input tag and W3C validation’ is closed to new replies.