Add screen reader text label

This can be changed to "sr-only" class for Bootstrap later. For now this adds it as it is in the Woo files, using the WordPress "screen-reader-text" class.
This commit is contained in:
Unknown 2018-03-22 13:20:00 -06:00 committed by zachary
parent 824b1e8dcc
commit 091eacef15
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ if ( ! defined( 'ABSPATH' ) ) {
?> ?>
<form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/' ) ); ?>"> <form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<div class="input-group"> <div class="input-group">
<label class="screen-reader-text" for="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>"><?php esc_html_e( 'Search for:', 'woocommerce' ); ?></label>
<input type="search" id="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>" class="search-field field form-control" placeholder="<?php echo esc_attr__( 'Search products&hellip;', 'understrap' ); ?>" value="<?php echo get_search_query(); ?>" name="s" /> <input type="search" id="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>" class="search-field field form-control" placeholder="<?php echo esc_attr__( 'Search products&hellip;', 'understrap' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />
<input type="hidden" name="post_type" value="product" /> <input type="hidden" name="post_type" value="product" />
<span class="input-group-append"> <span class="input-group-append">