WordPress.org

Plugin Directory

Changeset 1751955


Ignore:
Timestamp:
10/24/17 16:00:17 (8 weeks ago)
Author:
DaoByDesign
Message:

Addresses accessibility concerns regarding a missing label and disables autocomplete to prevent browser autocomplete functions from filling in the field.

Location:
contact-form-7-honeypot/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • contact-form-7-honeypot/trunk/honeypot.php

    r1546063 r1751955  
    66Author: Nocean 
    77Author URI: http://www.nocean.ca 
    8 Version: 1.10 
     8Version: 1.11 
    99Text Domain: contact-form-7-honeypot 
    1010Domain Path: /languages/ 
     
    120120    $atts['css'] = apply_filters('wpcf7_honeypot_container_css', 'display:none !important; visibility:hidden !important;'); 
    121121    $inputid = (!empty($atts['id'])) ? 'id="'.$atts['id'].'" ' : ''; 
     122    $inputid_for = ($inputid) ? 'for="'.$atts['id'].'" ' : ''; 
    122123    $html = '<span class="wpcf7-form-control-wrap ' . $atts['name'] . '-wrap" style="'.$atts['css'].'">'; 
    123     $html .= '<input ' . $inputid . 'class="' . $atts['class'] . '"  type="text" name="' . $atts['name'] . '" value="" size="40" tabindex="-1" />'; 
    124124    if (!$atts['nomessage']) { 
    125         $html .= '<span class="hp-message">'.$atts['message'].'</span>'; 
    126     } 
     125        $html .= '<label ' . $inputid_for . ' class="hp-message">'.$atts['message'].'</label>'; 
     126    } 
     127    $html .= '<input ' . $inputid . 'class="' . $atts['class'] . '"  type="text" name="' . $atts['name'] . '" value="" size="40" tabindex="-1" autocomplete="nope" />'; 
    127128    $html .= $validation_error . '</span>'; 
    128129 
     
    192193                        <td> 
    193194                            <input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /><br> 
    194                             <em><?php echo esc_html( __( 'For better security, change "honeypot" to something less bot-recognizable.', 'contact-form-7-honeypot' ) ); ?></em> 
     195                            <em><?php echo esc_html( __( 'This can be anything, but should be changed from the default generated "honeypot". For better security, change "honeypot" to something more appealing to a bot, such as text including "email" or "website".', 'contact-form-7-honeypot' ) ); ?></em> 
    195196                        </td> 
    196197                    </tr> 
     
    216217                    <tr> 
    217218                        <th scope="row"> 
    218                             <label for="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>"><?php echo esc_html( __( 'Don\'t Use Accessibility Message (optional)', 'contact-form-7-honeypot' ) ); ?></label> 
     219                            <label for="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>"><?php echo esc_html( __( 'Disable Accessibility Label (optional)', 'contact-form-7-honeypot' ) ); ?></label> 
    219220                        </th> 
    220221                        <td> 
    221222                            <input type="checkbox" name="nomessage:true" id="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>" class="messagekillvalue option" /><br /> 
    222                             <em><?php echo __('If checked, the accessibility message will not be generated. <strong>This is not recommended</strong>. If you\'re unsure, leave this unchecked.','contact-form-7-honeypot'); ?></em> 
     223                            <em><?php echo __('If checked, the accessibility label will not be generated. <strong>This is not recommended</strong>. If you\'re unsure, leave this unchecked.','contact-form-7-honeypot'); ?></em> 
    223224                        </td> 
    224225                    </tr> 
  • contact-form-7-honeypot/trunk/readme.txt

    r1546063 r1751955  
    22Tags: honeypot, antispam, captcha, spam, form, forms, contact form 7, contactform7, contact form, cf7, cforms, Contact Forms 7, Contact Forms, contacts 
    33Requires at least: 3.5 
    4 Tested up to: 4.7 
    5 Stable tag: 1.10 
     4Tested up to: 4.8.2 
     5Stable tag: 1.11 
    66Contributors: DaoByDesign 
    77Donate link: http://www.nocean.ca/buy-us-a-coffee/ 
     
    6565 
    6666== Changelog == 
     67= 1.11 = 
     68Addresses accessibility concerns regarding a missing label and disables autocomplete to prevent browser autocomplete functions from filling in the field. 
     69 
    6770= 1.10 = 
    6871Updates for Function/Class changes related to CF7 4.6. Removed plugin local language support, instead use translate.wordpress.org. 
Note: See TracChangeset for help on using the changeset viewer.