Making WordPress.org

Changeset 2332


Ignore:
Timestamp:
01/20/2016 12:06:07 AM (7 years ago)
Author:
samuelsidler
Message:

WordPress.tv: Improve accessibility of search form.

Props SergeyBiryukov.
Fixes #1473.

Location:
sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/header.php

    r1024 r2332  
    3535
    3636            <form id="searchform" name="searchform" method="get" action="<?php echo $wptv->home_url( '/' ); ?>">
     37                <label for="searchbox" class="screen-reader-text"><?php esc_attr_e( 'Search WordPress.tv', 'wptv' ); ?></label>
    3738                <input type="search" placeholder="<?php esc_attr_e( 'Search WordPress.tv', 'wptv' ); ?>" id="searchbox" name="s" value="<?php the_search_query(); ?>"  />
     39                <input type="submit" value="<?php esc_attr_e( 'Search', 'wptv' ); ?>" />
    3840            </form>
    3941
  • sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/style.css

    r1722 r2332  
    124124}
    125125
     126.screen-reader-text {
     127    clip: rect(1px, 1px, 1px, 1px);
     128    height: 1px;
     129    overflow: hidden;
     130    position: absolute !important;
     131    width: 1px;
     132    /* many screen reader and browser combinations announce broken words as they would appear visually */
     133    word-wrap: normal !important;
     134}
     135
    126136a, a:link, a:visited {
    127137    color: #21759b;
     
    302312}
    303313
    304 #searchform #searchbox {
     314#searchform #searchbox,
     315#searchform input[type=submit] {
    305316    margin-top: 15px;
     317}
     318
     319#searchform #searchbox:focus {
     320    border-color: #5b9dd9;
     321    -webkit-box-shadow: 0 0 2px rgba( 30, 140, 190, 0.8 );
     322    box-shadow: 0 0 2px rgba( 30, 140, 190, 0.8 );
    306323}
    307324
Note: See TracChangeset for help on using the changeset viewer.