WordPress.org

Making WordPress.org


Ignore:
Timestamp:
02/25/2015 08:47:29 PM (5 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Improve inline search accessibility.

  • Switch search input label from span tag to label tag
  • Add screen reader text for search icon

Fixes #883.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/searchform.php

    r744 r1327  
    3737        <div>
    3838        <label>
    39             <span class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'wporg' ); ?></span>
    40             <input type="text" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'wporg' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s">
     39            <label for="search-field" class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'wporg' ); ?></label>
     40            <input type="text" id="search-field" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'wporg' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s">
    4141        </label>
    4242        <input type="submit" class="shiny-blue search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'wporg' ); ?>">
Note: See TracChangeset for help on using the changeset viewer.