Support » Plugin: Honeypot for Contact Form 7 » How do we add a label to the input field?

  • Resolved a4jp

    (@a4jpcom)


    I want a score of 100 for accessibility in the Google Chrome browser audit. This plugin doesn’t include labels though. Can you add the <label> code to improve accessibility of the plugin? All the rest of my form is coded with labels and now I’m getting an 87 in the audit.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ryan

    (@daobydesign)

    Hey, I’ve added this to be considered more deeply in the next version of the plugin, but I don’t currently have an ETA on when that will happen.

    Until then, with a little bit of coding know-how, you can achieve this using the filtering that is in place for the whole HTML output. Read more here: ALTERING THE HONEYPOT OUTPUT HTML [ADVANCED], with code samples here.

    Thread Starter a4jp

    (@a4jpcom)

    Thank you so much for the quick reply and the plugin.

    I just removed the security entry from my email form and by removing the entry from my website I got a 100% ranking in the Google Chrome audit. Any updates in the future are greatly appreciated. m(-_-)m

    • This reply was modified 4 years, 9 months ago by a4jp.
    • This reply was modified 4 years, 9 months ago by a4jp.
    Plugin Author Ryan

    (@nocean)

    Hi @a4jpcom — I just dug deeper into this and the honeypot plugin will add a <label> tag by default, but because the ID field for the form element is optional, it only adds the “FOR” attribute to the <label> tag if you include an ID with your honeypot shortcode in your form.

    tl;dr: Just add an ID to the honeypot shortcode to the form.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do we add a label to the input field?’ is closed to new replies.