WordPress.org

Making WordPress.org

Changeset 1327


Ignore:
Timestamp:
02/25/2015 08:47:29 PM (4 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.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
2 edited

Legend:

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

    r990 r1327  
    3131            <div id="inner-search-icon-container">
    3232                <div id="inner-search-icon">
    33                     <div class="dashicons dashicons-search"></div>
     33                    <div class="dashicons dashicons-search"><span class="screen-reader-text"><?php _e( 'Search', 'wporg' ); ?></div>
    3434                </div>
    3535            </div>
  • 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.