Skip to:
Content

BuddyPress.org

Changeset 10126


Ignore:
Timestamp:
09/18/2015 06:59:21 PM (4 years ago)
Author:
mercime
Message:

Search Forms: Bind labels to text input fields.

Accessibility fixes adds 'for' attributes to the input fields of
the search forms for: Blogs, Forums, Groups, and Members.

Fixes #6627.

Location:
trunk/src
Files:
4 edited

Legend:

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

    r10110 r10126  
    14641464
    14651465    $search_form_html = '<form action="" method="get" id="search-blogs-form">
    1466         <label><input type="text" name="' . esc_attr( $query_arg ) . '" id="blogs_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
     1466        <label for="blogs_search"><input type="text" name="' . esc_attr( $query_arg ) . '" id="blogs_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
    14671467        <input type="submit" id="blogs_search_submit" name="blogs_search_submit" value="' . __( 'Search', 'buddypress' ) . '" />
    14681468    </form>';
  • trunk/src/bp-forums/bp-forums-template.php

    r10096 r10126  
    26812681
    26822682    $search_form_html = '<form action="" method="get" id="search-forums-form">
    2683         <label><input type="text" name="s" id="forums_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
     2683        <label for="forums_search"><input type="text" name="s" id="forums_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
    26842684        <input type="submit" id="forums_search_submit" name="forums_search_submit" value="' . __( 'Search', 'buddypress' ) . '" />
    26852685    </form>';
  • trunk/src/bp-groups/bp-groups-template.php

    r10110 r10126  
    49924992
    49934993    $search_form_html = '<form action="" method="get" id="search-groups-form">
    4994         <label><input type="text" name="' . esc_attr( $query_arg ) . '" id="groups_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
     4994        <label for="groups_search"><input type="text" name="' . esc_attr( $query_arg ) . '" id="groups_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
    49954995        <input type="submit" id="groups_search_submit" name="groups_search_submit" value="'. __( 'Search', 'buddypress' ) .'" />
    49964996    </form>';
  • trunk/src/bp-members/bp-members-template.php

    r10110 r10126  
    13521352
    13531353    $search_form_html = '<form action="" method="get" id="search-members-form">
    1354         <label><input type="text" name="' . esc_attr( $query_arg ) . '" id="members_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
     1354        <label for="members_search"><input type="text" name="' . esc_attr( $query_arg ) . '" id="members_search" placeholder="'. esc_attr( $search_value ) .'" /></label>
    13551355        <input type="submit" id="members_search_submit" name="members_search_submit" value="' . __( 'Search', 'buddypress' ) . '" />
    13561356    </form>';
Note: See TracChangeset for help on using the changeset viewer.