Accessibility: Menus screen: Improve headings and instructions for better accessibility.

Props audrasjb, melchoyce, juliemoynat.
Fixes #43397.

Built from https://develop.svn.wordpress.org/trunk@42857


git-svn-id: http://core.svn.wordpress.org/trunk@42687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2018-03-20 17:48:21 +00:00
parent 80c9ed8bfa
commit d0e1b54105
2 changed files with 7 additions and 4 deletions

View File

@ -742,7 +742,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<span class="add-edit-menu-action"> <span class="add-edit-menu-action">
<?php <?php
printf( printf(
__( 'Edit your menu below, or <a href="%s">create a new menu</a>.' ), esc_url( __( 'Edit your menu below, or <a href="%s">create a new menu</a>. Don&#8217;t forget to save your changes!' ), esc_url(
add_query_arg( add_query_arg(
array( array(
'action' => 'edit', 'action' => 'edit',
@ -752,6 +752,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
) )
); );
?> ?>
<span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span>
</span><!-- /add-edit-menu-action --> </span><!-- /add-edit-menu-action -->
<?php else : ?> <?php else : ?>
<form method="get" action="<?php echo admin_url( 'nav-menus.php' ); ?>"> <form method="get" action="<?php echo admin_url( 'nav-menus.php' ); ?>">
@ -800,7 +801,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<span class="add-new-menu-action"> <span class="add-new-menu-action">
<?php <?php
printf( printf(
__( 'or <a href="%s">create a new menu</a>.' ), esc_url( __( 'or <a href="%s">create a new menu</a>. Don&#8217;t forget to save your changes!' ), esc_url(
add_query_arg( add_query_arg(
array( array(
'action' => 'edit', 'action' => 'edit',
@ -810,6 +811,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
) )
); );
?> ?>
<span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span>
</span><!-- /add-new-menu-action --> </span><!-- /add-new-menu-action -->
</form> </form>
<?php <?php
@ -830,6 +832,7 @@ if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
<input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" /> <input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
<input type="hidden" name="action" value="add-menu-item" /> <input type="hidden" name="action" value="add-menu-item" />
<?php wp_nonce_field( 'add-menu_item', 'menu-settings-column-nonce' ); ?> <?php wp_nonce_field( 'add-menu_item', 'menu-settings-column-nonce' ); ?>
<h2><?php _e( 'Add menu items' ); ?></h2>
<?php do_accordion_sections( 'nav-menus', 'side', null ); ?> <?php do_accordion_sections( 'nav-menus', 'side', null ); ?>
</form> </form>
@ -843,6 +846,7 @@ if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
$new_screen_class = 'blank-slate'; $new_screen_class = 'blank-slate';
} }
?> ?>
<h2><?php _e( 'Menu structure' ); ?></h2>
<div class="menu-edit <?php echo $new_screen_class; ?>"> <div class="menu-edit <?php echo $new_screen_class; ?>">
<input type="hidden" name="nav-menu-data"> <input type="hidden" name="nav-menu-data">
<?php <?php
@ -875,7 +879,6 @@ if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) {
<div id="post-body"> <div id="post-body">
<div id="post-body-content" class="wp-clearfix"> <div id="post-body-content" class="wp-clearfix">
<?php if ( ! $add_new_screen ) : ?> <?php if ( ! $add_new_screen ) : ?>
<h3><?php _e( 'Menu Structure' ); ?></h3>
<?php <?php
$hide_style = ''; $hide_style = '';
if ( isset( $menu_items ) && 0 == count( $menu_items ) ) { if ( isset( $menu_items ) && 0 == count( $menu_items ) ) {

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.0-alpha-42856'; $wp_version = '5.0-alpha-42857';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.