Make WordPress Core

Ticket #40678: 40678.6.diff

File 40678.6.diff, 16.8 KB (added by audrasjb, 7 years ago)

Replace span with h2 tag in screen-reader-text hint for both columns

  • src/wp-admin/css/nav-menus.css

    diff --git a/src/wp-admin/css/nav-menus.css b/src/wp-admin/css/nav-menus.css
    index 77c6274..cd883e2 100644
    a b ul.add-menu-item-tabs li { 
    6565        position: relative;
    6666}
    6767
     68ul.nav-tab-wrapper > li {
     69        margin-bottom: 0;
     70}
     71
    6872.blank-slate .menu-settings {
    6973        border: none;
    7074        margin-top: 0;
  • src/wp-admin/includes/ajax-actions.php

    diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
    index 7945bc4..ab521ba 100644
    a b function wp_ajax_heartbeat() { 
    30253025        }
    30263026
    30273027        if ( 1 !== $nonce_state ) {
    3028                 /**
    3029                  * Filters the nonces to send to the editor.
    3030                  *
    3031                  * @since 4.3.0
    3032                  *
    3033                  * @param array|object $response  The no-priv Heartbeat response object or array.
    3034                  * @param array        $data      An array of data passed via $_POST.
    3035                  * @param string       $screen_id The screen id.
    3036                  */
    30373028                $response = apply_filters( 'wp_refresh_nonces', $response, $data, $screen_id );
    30383029
    30393030                if ( false === $nonce_state ) {
  • src/wp-admin/includes/class-walker-nav-menu-edit.php

    diff --git a/src/wp-admin/includes/class-walker-nav-menu-edit.php b/src/wp-admin/includes/class-walker-nav-menu-edit.php
    index d53c0c8..7f5beaa 100644
    a b class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { 
    116116                        <div class="menu-item-bar">
    117117                                <div class="menu-item-handle">
    118118                                        <span class="item-title"><span class="menu-item-title"><?php echo esc_html( $title ); ?></span> <span class="is-submenu" <?php echo $submenu_text; ?>><?php _e( 'sub item' ); ?></span></span>
     119                                        <span class="screen-reader-text"><?php esc_html_e( 'Press return or enter to open this section.' ); ?></span>
    119120                                        <span class="item-controls">
    120121                                                <span class="item-type"><?php echo esc_html( $item->type_label ); ?></span>
    121122                                                <span class="item-order hide-if-js">
  • src/wp-admin/includes/nav-menu.php

    diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php
    index 5b8bfd7..547d324 100644
    a b function wp_nav_menu_item_link_meta_box() { 
    300300
    301301                <p class="button-controls wp-clearfix">
    302302                        <span class="add-to-menu">
    303                                 <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-custom-menu-item" id="submit-customlinkdiv" />
     303                                <button type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" name="add-custom-menu-item" id="submit-customlinkdiv">
     304                                        <?php esc_attr_e( 'Add to Menu' ); ?><span class="screen-reader-text"> <?php esc_attr_e( 'You will have to activate "save menu" button to save your changes' ); ?></span>
     305                                </button>
    304306                                <span class="spinner"></span>
    305307                        </span>
    306308                </p>
    function wp_nav_menu_item_post_type_meta_box( $object, $box ) { 
    631633                        </span>
    632634
    633635                        <span class="add-to-menu">
    634                                 <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-post-type-menu-item" id="<?php echo esc_attr( 'submit-posttype-' . $post_type_name ); ?>" />
     636                                <button type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" name="add-post-type-menu-item" id="<?php echo esc_attr( 'submit-posttype-' . $post_type_name ); ?>">
     637                                        <?php esc_attr_e( 'Add to Menu' ); ?><span class="screen-reader-text"> <?php esc_attr_e( 'You will have to activate "save menu" button to save your changes' ); ?></span>
     638                                </button>
    635639                                <span class="spinner"></span>
    636640                        </span>
    637641                </p>
    function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) { 
    876880                        </span>
    877881
    878882                        <span class="add-to-menu">
    879                                 <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-taxonomy-menu-item" id="<?php echo esc_attr( 'submit-taxonomy-' . $taxonomy_name ); ?>" />
     883                                <button type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" name="add-taxonomy-menu-item" id="<?php echo esc_attr( 'submit-taxonomy-' . $taxonomy_name ); ?>">
     884                                        <?php esc_attr_e( 'Add to Menu' ); ?><span class="screen-reader-text"> <?php esc_attr_e( 'You will have to activate "save menu" button to save your changes' ); ?></span>
     885                                </button>
    880886                                <span class="spinner"></span>
    881887                        </span>
    882888                </p>
  • src/wp-admin/includes/theme.php

    diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php
    index 90ecbc2..b9164a7 100644
    a b function customize_themes_print_templates() { 
    744744
    745745                        <div class="theme-actions">
    746746                                <# if ( data.active ) { #>
    747                                         <button type="button" class="button button-primary customize-theme"><?php _e( 'Customize' ); ?></button>
     747                                        <button type="button" class="button button-primary customize-theme"><?php _e( 'Customize' ); ?></a>
    748748                                <# } else if ( 'installed' === data.type ) { #>
    749749                                        <?php if ( current_user_can( 'delete_themes' ) ) { ?>
    750750                                                <# if ( data.actions && data.actions['delete'] ) { #>
    751751                                                        <a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php _e( 'Delete' ); ?></a>
    752752                                                <# } #>
    753753                                        <?php } ?>
    754                                         <button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php _e( 'Live Preview' ); ?></button>
     754                                        <button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php _e( 'Live Preview' ); ?></span>
    755755                                <# } else { #>
    756756                                        <button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></button>
    757757                                        <button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php _e( 'Install &amp; Preview' ); ?></button>
  • src/wp-admin/js/user-suggest.js

    diff --git a/src/wp-admin/js/user-suggest.js b/src/wp-admin/js/user-suggest.js
    index 54cb99d..3efd628 100644
    a b  
    2323                 * Adds an autocomplete function to input fields marked with the class
    2424                 * 'wp-suggest-user'.
    2525                 *
    26                  * A minimum of two characters is required to trigger the suggestions. The
    27                  * autocompletion menu is shown at the left bottom of the input field. On
    28                  * RTL installations, it is shown at the right top. Adds the class 'open' to
    29                  * the input field when the autocompletion menu is shown.
     26                 * A minimum of two characters is required to trigger
     27                 * the suggestions. The autocompletion menu is shown at the left bottom of the input
     28                 * field. On RTL installations, it is shown at the right top.
     29                 * Adds the class 'open' to the input field when the autocompletion menu
     30                 * is shown.
    3031                 *
    3132                 * Does a backend call to retrieve the users.
    3233                 *
  • src/wp-admin/js/xfn.js

    diff --git a/src/wp-admin/js/xfn.js b/src/wp-admin/js/xfn.js
    index d290ac3..de8401b 100644
    a b  
    1 /**
    2  * Generates the XHTML Friends Network 'rel' string from the inputs.
    3  *
    4  * @deprecated 3.5.0
    5  */
    61jQuery( document ).ready(function( $ ) {
    72        $( '#link_rel' ).prop( 'readonly', true );
    83        $( '#linkxfndiv input' ).bind( 'click keyup', function() {
  • src/wp-admin/nav-menus.php

    diff --git a/src/wp-admin/nav-menus.php b/src/wp-admin/nav-menus.php
    index 7f19e86..223ac8c 100644
    a b require_once( ABSPATH . 'wp-admin/admin-header.php' ); 
    626626
    627627        <hr class="wp-header-end">
    628628
    629         <h2 class="nav-tab-wrapper wp-clearfix">
    630                 <a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php echo $nav_tab_active_class; ?>"><?php esc_html_e( 'Edit Menus' ); ?></a>
     629        <ul class="nav-tab-wrapper wp-clearfix">
     630                <li><a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php echo $nav_tab_active_class; ?>" aria-label="<?php esc_html_e( 'Main tab to edit menus' ); ?>"><?php esc_html_e( 'Edit Menus' ); ?></a></li>
    631631                <?php if ( $num_locations && $menu_count ) : ?>
    632                         <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>" class="nav-tab
     632                        <li><a href="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>" class="nav-tab
    633633                                                                <?php
    634634                                                                if ( $locations_screen ) {
    635635                                                                        echo ' nav-tab-active';}
    636636?>
    637 "><?php esc_html_e( 'Manage Locations' ); ?></a>
     637" aria-label="<?php esc_html_e( 'Main tab to edit menus locations' ); ?>"><?php esc_html_e( 'Manage Locations' ); ?></a></li>
    638638                <?php
    639639                        endif;
    640640                ?>
    641         </h2>
     641        </ul>
    642642        <?php
    643643        foreach ( $messages as $message ) :
    644644                echo $message . "\n";
    require_once( ABSPATH . 'wp-admin/admin-header.php' ); 
    740740        <div class="manage-menus">
    741741                <?php if ( $menu_count < 2 ) : ?>
    742742                <span class="add-edit-menu-action">
     743                        <span class="screen-reader-text"><?php _e( 'Do not forget to activate "save menu" button to save all changes made in this screen.' ); ?></span>
    743744                        <?php
    744745                        printf(
    745746                                __( 'Edit your menu below, or <a href="%s">create a new menu</a>.' ), esc_url(
    if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) { 
    830831                        <input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
    831832                        <input type="hidden" name="action" value="add-menu-item" />
    832833                        <?php wp_nonce_field( 'add-menu_item', 'menu-settings-column-nonce' ); ?>
     834                        <h2 class="screen-reader-text"><?php _e( 'Select the items you want to display in your menu.' ); ?></h2>
    833835                        <?php do_accordion_sections( 'nav-menus', 'side', null ); ?>
    834836                </form>
    835837
    if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) { 
    843845                                $new_screen_class = 'blank-slate';
    844846                        }
    845847                        ?>
     848                                <h2 class="screen-reader-text"><?php _e( 'Menu settings: menu location, display order of its items, labels, moving or deleting items, etc.' ); ?></h2>
    846849                                <div class="menu-edit <?php echo $new_screen_class; ?>">
    847850                                        <input type="hidden" name="nav-menu-data">
    848851                                        <?php
  • src/wp-content/themes/twentyseventeen/assets/css/colors-dark.css

    diff --git a/src/wp-content/themes/twentyseventeen/assets/css/colors-dark.css b/src/wp-content/themes/twentyseventeen/assets/css/colors-dark.css
    index 3b85b97..d6fda60 100644
    a b  
    1919.colors-dark .entry-content a:hover,
    2020.colors-dark .entry-summary a:focus,
    2121.colors-dark .entry-summary a:hover,
    22 .colors-dark .comment-content a:focus,
    23 .colors-dark .comment-content a:hover,
    2422.colors-dark .widget a:focus,
    2523.colors-dark .widget a:hover,
    2624.colors-dark .site-footer .widget-area a:focus,
     
    7674.colors-dark .entry-content a:hover,
    7775.colors-dark .entry-summary a:focus,
    7876.colors-dark .entry-summary a:hover,
    79 .colors-dark .comment-content a:focus,
    80 .colors-dark .comment-content a:hover,
    8177.colors-dark .widget a:focus,
    8278.colors-dark .widget a:hover,
    8379.colors-dark .site-footer .widget-area a:focus,
     
    132128
    133129.colors-dark .entry-content a,
    134130.colors-dark .entry-summary a,
    135 .colors-dark .comment-content a,
    136131.colors-dark .widget a,
    137132.colors-dark .site-footer .widget-area a,
    138133.colors-dark .posts-navigation a,
    body.colors-dark, 
    480475
    481476/* Fixes linked images */
    482477.colors-dark .entry-content a img,
    483 .colors-dark .comment-content a img,
    484478.colors-dark .widget a img {
    485479        -webkit-box-shadow: 0 0 0 8px #222;
    486480        box-shadow: 0 0 0 8px #222;
  • src/wp-content/themes/twentyseventeen/inc/color-patterns.php

    diff --git a/src/wp-content/themes/twentyseventeen/inc/color-patterns.php b/src/wp-content/themes/twentyseventeen/inc/color-patterns.php
    index ddd25d0..2eaca03 100644
    a b function twentyseventeen_custom_colors_css() { 
    3636.colors-custom .entry-content a:hover,
    3737.colors-custom .entry-summary a:focus,
    3838.colors-custom .entry-summary a:hover,
    39 .colors-custom .comment-content a:focus,
    40 .colors-custom .comment-content a:hover,
    4139.colors-custom .widget a:focus,
    4240.colors-custom .widget a:hover,
    4341.colors-custom .site-footer .widget-area a:focus,
    function twentyseventeen_custom_colors_css() { 
    9391
    9492.colors-custom .entry-content a,
    9593.colors-custom .entry-summary a,
    96 .colors-custom .comment-content a,
    9794.colors-custom .widget a,
    9895.colors-custom .site-footer .widget-area a,
    9996.colors-custom .posts-navigation a,
    function twentyseventeen_custom_colors_css() { 
    155152.colors-custom .entry-content a:hover,
    156153.colors-custom .entry-summary a:focus,
    157154.colors-custom .entry-summary a:hover,
    158 .colors-custom .comment-content a:focus,
    159 .colors-custom .comment-content a:hover,
    160155.colors-custom .widget a:focus,
    161156.colors-custom .widget a:hover,
    162157.colors-custom .site-footer .widget-area a:focus,
    body.colors-custom, 
    498493.colors-custom .entry-content a:focus,
    499494.colors-custom .entry-summary a:hover,
    500495.colors-custom .entry-summary a:focus,
    501 .colors-custom .comment-content a:focus,
    502 .colors-custom .comment-content a:hover,
    503496.colors-custom .widget a:hover,
    504497.colors-custom .widget a:focus,
    505498.colors-custom .site-footer .widget-area a:hover,
  • src/wp-content/themes/twentyseventeen/style.css

    diff --git a/src/wp-content/themes/twentyseventeen/style.css b/src/wp-content/themes/twentyseventeen/style.css
    index de3c26f..5580e4e 100644
    a b a:active { 
    11781178
    11791179.entry-content a,
    11801180.entry-summary a,
    1181 .comment-content a,
    11821181.widget a,
    11831182.site-footer .widget-area a,
    11841183.posts-navigation a,
    a .nav-title, 
    12261225.entry-content a:hover,
    12271226.entry-summary a:focus,
    12281227.entry-summary a:hover,
    1229 .comment-content a:focus,
    1230 .comment-content a:hover,
    12311228.widget a:focus,
    12321229.widget a:hover,
    12331230.site-footer .widget-area a:focus,
    a:hover .nav-title, 
    12791276
    12801277/* Fixes linked images */
    12811278.entry-content a img,
    1282 .comment-content a img,
    12831279.widget a img {
    12841280        -webkit-box-shadow: 0 0 0 8px #fff;
    12851281        box-shadow: 0 0 0 8px #fff;
  • src/wp-includes/kses.php

    diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php
    index 93fc9dd..bf963ab 100644
    a b function _wp_kses_split_callback( $match ) { 
    971971function wp_kses_split2( $string, $allowed_html, $allowed_protocols ) {
    972972        $string = wp_kses_stripslashes( $string );
    973973
    974         // It matched a ">" character.
    975974        if ( substr( $string, 0, 1 ) != '<' ) {
    976975                return '&gt;';
    977976        }
     977        // It matched a ">" character
    978978
    979         // Allow HTML comments.
    980979        if ( '<!--' == substr( $string, 0, 4 ) ) {
    981980                $string = str_replace( array( '<!--', '-->' ), '', $string );
    982981                while ( $string != ( $newstring = wp_kses( $string, $allowed_html, $allowed_protocols ) ) ) {
    function wp_kses_split2( $string, $allowed_html, $allowed_protocols ) { 
    991990                $string = preg_replace( '/-$/', '', $string );
    992991                return "<!--{$string}-->";
    993992        }
     993        // Allow HTML comments
    994994
    995         // It's seriously malformed.
    996995        if ( ! preg_match( '%^<\s*(/\s*)?([a-zA-Z0-9-]+)([^>]*)>?$%', $string, $matches ) ) {
    997996                return '';
    998997        }
     998        // It's seriously malformed
    999999
    10001000        $slash    = trim( $matches[1] );
    10011001        $elem     = $matches[2];
    function wp_kses_split2( $string, $allowed_html, $allowed_protocols ) { 
    10051005                $allowed_html = wp_kses_allowed_html( $allowed_html );
    10061006        }
    10071007
    1008         // They are using a not allowed HTML element.
    10091008        if ( ! isset( $allowed_html[ strtolower( $elem ) ] ) ) {
    10101009                return '';
    10111010        }
     1011        // They are using a not allowed HTML element
    10121012
    1013         // No attributes are allowed for closing elements.
    10141013        if ( $slash != '' ) {
    10151014                return "</$elem>";
    10161015        }
     1016        // No attributes are allowed for closing elements
    10171017
    10181018        return wp_kses_attr( $elem, $attrlist, $allowed_html, $allowed_protocols );
    10191019}
  • src/wp-includes/wp-db.php

    diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
    index 901cf10..1e5fda6 100644
    a b class wpdb { 
    33163316         * @return false|void
    33173317         */
    33183318        public function bail( $message, $error_code = '500' ) {
    3319                 if ( $this->show_errors ) {
    3320                         $error = '';
    3321 
    3322                         if ( $this->use_mysqli ) {
    3323                                 if ( $this->dbh instanceof mysqli ) {
    3324                                         $error = mysqli_error( $this->dbh );
    3325                                 } elseif ( mysqli_connect_errno() ) {
    3326                                         $error = mysqli_connect_error();
    3327                                 }
    3328                         } else {
    3329                                 if ( is_resource( $this->dbh ) ) {
    3330                                         $error = mysql_error( $this->dbh );
    3331                                 } else {
    3332                                         $error = mysql_error();
    3333                                 }
    3334                         }
    3335 
    3336                         if ( $error ) {
    3337                                 $message = '<p><code>' . $error . "</code></p>\n" . $message;
    3338                         }
    3339 
    3340                         wp_die( $message );
    3341                 } else {
     3319                if ( ! $this->show_errors ) {
    33423320                        if ( class_exists( 'WP_Error', false ) ) {
    33433321                                $this->error = new WP_Error( $error_code, $message );
    33443322                        } else {
    33453323                                $this->error = $message;
    33463324                        }
    3347 
    33483325                        return false;
    33493326                }
     3327                wp_die( $message );
    33503328        }
    33513329
    33523330