Skip to:
Content

BuddyPress.org

Changeset 9240


Ignore:
Timestamp:
12/19/2014 06:48:53 PM (10 years ago)
Author:
boonebgorges
Message:

Improve <label> markup for mesage search form.

  • Associate the label properly with the labeled element.
  • Add bp-screen-reader-text class for better consistency with other similar text in BP templates.

Props hnla.
Fixes #6010.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-template.php

    r9217 r9240  
    10721072
    10731073    <form action="" method="get" id="search-message-form">
    1074         <label><input type="text" name="s" id="messages_search" <?php if ( $search_value === $default_search_value ) : ?>placeholder="<?php echo esc_html( $search_value ); ?>"<?php endif; ?> <?php if ( $search_value !== $default_search_value ) : ?>value="<?php echo esc_html( $search_value ); ?>"<?php endif; ?> /></label>
     1074        <label for="messages_search" class="bp-screen-reader-text"><?php _e( 'Search Messages', 'buddypress' ); ?></label>
     1075        <input type="text" name="s" id="messages_search" <?php if ( $search_value === $default_search_value ) : ?>placeholder="<?php echo esc_html( $search_value ); ?>"<?php endif; ?> <?php if ( $search_value !== $default_search_value ) : ?>value="<?php echo esc_html( $search_value ); ?>"<?php endif; ?> />
    10751076        <input type="submit" id="messages_search_submit" name="messages_search_submit" value="<?php esc_attr_e( 'Search', 'buddypress' ) ?>" />
    10761077    </form>
Note: See TracChangeset for help on using the changeset viewer.