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 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3850
    Guenni007
    Participant

    sometimes its important to get a propper Validation for some kind of customers.

    there are two things to change to pass the w3org html validation, because the h1-h6 element are not allowed in
    One thing is to get rid of
    <hgroup id=”site-logo”>
    </hgroup>
    in header-extensions.php <!– #site-logo –> part you can use instead
    <div id=”site-logo”>
    </div> without making any changes to css because no rule was found for <hgroup>

    the other thing is in the searchform-extensions.php because:`
    The for attribute of the label element must refer to a form control.
    <label class=”assistive-text” for=”s”>Suchen</label>`

    I realy have no idea to make here an elegant solution.
    i do not need the search option in my site so no need for me to change it – but if you have a solution for it – let me know. !

    you can see it on http://www.guenterweber.com

    #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 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.