Make WordPress Core

Changeset 26843


Ignore:
Timestamp:
12/09/2013 08:38:00 PM (11 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: match screen-reader-text accessibility styles a bit better with core, to avoid a jump when you move through the links, and to avoid a horizontal scroll at certain viewport widths. Also fix JS focus by specifying the first match object. Closes #25592.

Location:
trunk/src/wp-content/themes/twentyfourteen
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r26691 r26843  
    263263    }
    264264
    265     wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131205', true );
     265    wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131209', true );
    266266}
    267267add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
  • trunk/src/wp-content/themes/twentyfourteen/js/functions.js

    r26691 r26843  
    6464            wrapper.toggleClass( 'hide' );
    6565
    66             if ( that.is( '.active' ) || $( '.screen-reader-text' ) === event.target ) {
     66            if ( that.is( '.active' ) || $( '.search-toggle .screen-reader-text' )[0] === event.target ) {
    6767                wrapper.find( '.search-field' ).focus();
    6868            }
  • trunk/src/wp-content/themes/twentyfourteen/rtl.css

    r26831 r26843  
    9999
    100100.search-toggle .screen-reader-text {
    101     right: auto;
    102     left: 0;
     101    right: 5px; /* Avoid a horizontal scrollbar when the site has a long menu */
     102    left: auto;
    103103}
    104104
  • trunk/src/wp-content/themes/twentyfourteen/style.css

    r26831 r26843  
    879879}
    880880
     881.search-toggle .screen-reader-text {
     882    left: 5px; /* Avoid a horizontal scrollbar when the site has a long menu */
     883}
     884
    881885.search-box-wrapper {
    882886    -webkit-box-sizing: border-box;
Note: See TracChangeset for help on using the changeset viewer.