Improve accessibility of nav menu locations form.
A couple of small tweaks to the nav menu locations form that make it friendlier to assistive technology. These include: * labels for selects * better context for the "Edit" link. We hide "edit" from screen readers and instead give them a phrase with context since they may not be able to take advantage of the visual context Additionally, there are some minor css tweaks to improve the visual alignment of the rows. We also remove duplicate IDs and use classes instead. Props afercia. fixes #31090. Built from https://develop.svn.wordpress.org/trunk@31272 git-svn-id: http://core.svn.wordpress.org/trunk@31253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
04216633b2
commit
a4a1273d3a
|
@ -101,10 +101,6 @@ ul.add-menu-item-tabs li {
|
|||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.menu-edit p {
|
||||
margin: .3em 0 .6em;
|
||||
}
|
||||
|
||||
.menu-edit #post-body-content h3 {
|
||||
margin: 1em 0 10px;
|
||||
}
|
||||
|
@ -216,8 +212,16 @@ ul.add-menu-item-tabs li {
|
|||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.widefat td.menu-location-menus {
|
||||
padding-bottom: 5px;
|
||||
.widefat .menu-locations tr + tr td {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.widefat .menu-locations td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.menu-location-title label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.menu-location-menus select {
|
||||
|
|
|
@ -101,10 +101,6 @@ ul.add-menu-item-tabs li {
|
|||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.menu-edit p {
|
||||
margin: .3em 0 .6em;
|
||||
}
|
||||
|
||||
.menu-edit #post-body-content h3 {
|
||||
margin: 1em 0 10px;
|
||||
}
|
||||
|
@ -216,8 +212,16 @@ ul.add-menu-item-tabs li {
|
|||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.widefat td.menu-location-menus {
|
||||
padding-bottom: 5px;
|
||||
.widefat .menu-locations tr + tr td {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.widefat .menu-locations td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.menu-location-title label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.menu-location-menus select {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -581,8 +581,8 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||
</tfoot>-->
|
||||
<tbody class="menu-locations">
|
||||
<?php foreach ( $locations as $_location => $_name ) { ?>
|
||||
<tr id="menu-locations-row">
|
||||
<td class="menu-location-title"><strong><?php echo $_name; ?></strong></td>
|
||||
<tr class="menu-locations-row">
|
||||
<td class="menu-location-title"><label for="locations-<?php echo $_location; ?>"><?php echo $_name; ?></label></td>
|
||||
<td class="menu-location-menus">
|
||||
<select name="menu-locations[<?php echo $_location; ?>]" id="locations-<?php echo $_location; ?>">
|
||||
<option value="0"><?php printf( '— %s —', esc_html__( 'Select a Menu' ) ); ?></option>
|
||||
|
@ -597,7 +597,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||
<?php if ( isset( $menu_locations[ $_location ] ) && 0 != $menu_locations[ $_location ] ) : ?>
|
||||
<span class="locations-edit-menu-link">
|
||||
<a href="<?php echo esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => $menu_locations[$_location] ), admin_url( 'nav-menus.php' ) ) ); ?>">
|
||||
<?php _ex( 'Edit', 'menu' ); ?>
|
||||
<span aria-hidden="true"><?php _ex( 'Edit', 'menu' ); ?></span><span class="screen-reader-text"><?php _e( 'Edit selected menu' ); ?></span>
|
||||
</a>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
@ -606,9 +606,9 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
|||
<?php _ex( 'Use new menu', 'menu' ); ?>
|
||||
</a>
|
||||
</span>
|
||||
</div><!-- #locations-row-links -->
|
||||
</div><!-- .locations-row-links -->
|
||||
</td><!-- .menu-location-menus -->
|
||||
</tr><!-- #menu-locations-row -->
|
||||
</tr><!-- .menu-locations-row -->
|
||||
<?php } // foreach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31271';
|
||||
$wp_version = '4.2-alpha-31272';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue