Make WordPress Core

Ticket #40678: 40678.tabs.diff

File 40678.tabs.diff, 1.8 KB (added by audrasjb, 7 years ago)

For tabs at the top (“Edit menus” and “Manage locations”): remove the “h2” tag and use an unordered list (“ul”) with an “aria-label” attribute that would tell “Main tabs for editing menus”

  • 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/nav-menus.php

    diff --git a/src/wp-admin/nav-menus.php b/src/wp-admin/nav-menus.php
    index 7f19e86..bc3843c 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";