badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

html Validation

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3851
    Guenni007
    Participant

    one quick and dirty solution to get rid of that searchform error is to give no label to the assistive-text.

    so remove the line:
    <label class=”assistive-text” for=”s”><?php _e( ‘Search’, ‘cleanretina’ ); ?></label>

    Search will work without it and html Validation is than correct.

    #3854
    Guenni007
    Participant

    i now did it this way:
    i removed the class s and set an id s

    <form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="searchform clearfix" method="get">
    <label class="assistive-text" for="s"><?php _e( 'Search', 'cleanretina' ); ?></label>
    <input id="s" class="field" name="s" type="text" placeholder="<?php esc_attr_e( 'Search', 'cleanretina' ); ?>">
    </form><!-- .searchform -->

    and this will do the trick

    #3857
    Guenni007
    Participant

    btw you can stay class s but add id s

    <form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="searchform clearfix" method="get">
    <label class="assistive-text" for="s"><?php _e( 'Search', 'cleanretina' ); ?></label>
    <input id="s" class="s field" name="s" type="text" placeholder="<?php esc_attr_e( 'Search', 'cleanretina' ); ?>">
    </form><!-- .searchform -->
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.