• Resolved Vkreations

    (@vnforgiven)


    While debugging the site I made using Vantage, we are checking for accessibility errors and an error is about missing label in search form that contained in main menu.
    If anyone know where I can find the code to put a label in it or in child-themes functions.php.
    Thanks.
    V_

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi again

    If you’d like to search the theme in order to make changes you can download the theme ZIP file from https://www.ads-software.com/themes/vantage/. Unzip the folder and drag the entire folder into a code editor. Here are a few free options https://www.ntaskmanager.com/blog/free-best-code-editors/. You can then do an in folder search for the file you’re after.

    searchform.php is located in the theme’s root folder. It looks like you’re already using a child theme. For any one else reading, a starter child theme can be found at https://siteorigin.com/vantage-documentation/child-theme/.

    Thread Starter Vkreations

    (@vnforgiven)

    Hi, thanks for answering.
    The file is the Vantage: searchform.php
    where the code is

    <form method="get" class="searchform" name="search form" title="search form" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
    	<label for="search-form" class="screen-reader-text"><?php esc_html_e( 'Search for:', 'vantage' ); ?></label>
    	<input type="search" name="search box" title="search box" class="field" id="search-form" value="<?php echo esc_attr( get_search_query() ); ?>" placeholder="<?php esc_attr_e( 'Search', 'vantage' ); ?>"/>
    </form>

    Do you know where the label tag must be placed?
    I put the name and title tags but no result. The checker says that the form (the search icon which is displayed) must have a label.
    I deactivated temporarily until a solution is found.

    Hi, thanks for the update. I’m not quite sure what the validator is after. The form has a label. Please, send the validator message; we’ll take a look and go from there.

    Cheers

    Andrew

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Missing Label in Search form’ is closed to new replies.