• searchform.php
    Line 12: you forgot to include id="s"

    * You currently have name=”s” which is not correct, or at least not complete (doesnt W3C validate).

Viewing 1 replies (of 1 total)
  • Hi Kimberly,

    I hope you are well today and thanks for posting here.

    It’s not actually the bug as the id attribute is not required if the theme is developed using HTML5 and we have developed Sparkling theme using HTML5.

    You can find the default WordPress code to display search form as following in this WordPress core file https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/general-template.php

    if ( 'html5' == $format ) {
    	                        $form = '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">
    	                                <label>
    	                                        <span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
    	                                        <input type="search" class="search-field" placeholder="' . esc_attr_x( 'Search &hellip;', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" title="' . esc_attr_x( 'Search for:', 'label' ) . '" />
    	                                </label>
    	                                <input type="submit" class="search-submit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
    	                        </form>';
    	                } else {
    	                        $form = '<form role="search" method="get" id="searchform" class="searchform" action="' . esc_url( home_url( '/' ) ) . '">
    	                                <div>
    	                                        <label class="screen-reader-text" for="s">' . _x( 'Search for:', 'label' ) . '</label>
    	                                        <input type="text" value="' . get_search_query() . '" name="s" id="s" />
    	                                        <input type="submit" id="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
    	                                </div>
    	                        </form>';
    	                }

    Best Regards,
    Movin

Viewing 1 replies (of 1 total)
  • The topic ‘Bug’ is closed to new replies.