Customize: Make the menu edit button look like a link.

The button was introduced in [37901] to allow users switching to the selected menu for further edits. A link makes it more clear that the user is taken away from the current view.
This also adds an aria label and makes the button label more verbose, 'Edit Menu'.

Props afercia.
Props helen for review.
Fixes #36795.

git-svn-id: https://develop.svn.wordpress.org/trunk@38189 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling 2016-08-03 22:44:58 +00:00
parent cd6a017b66
commit 9628a53be7
2 changed files with 15 additions and 2 deletions

View File

@ -16,8 +16,21 @@
color: #555;
}
/* The `edit-menu` button uses also the `button-link` class. */
.customize-control-nav_menu_location .edit-menu {
margin-top: 1px;
margin-left: 6px;
vertical-align: middle;
color: #0073aa;
text-decoration: underline;
}
.customize-control-nav_menu_location .edit-menu:hover,
.customize-control-nav_menu_location .edit-menu:active {
color: #00a0d2;
}
.customize-control-nav_menu_location .edit-menu:focus {
color: #124964;
}
.wp-customizer .menu-item-bar .menu-item-handle,

View File

@ -77,7 +77,7 @@ class WP_Customize_Nav_Menu_Location_Control extends WP_Customize_Control {
?>
</select>
</label>
<button type="button" class="button edit-menu<?php if ( ! $this->value() ) { echo ' hidden'; } ?>"><?php _e( 'Edit' ); ?></button>
<button type="button" class="button-link edit-menu<?php if ( ! $this->value() ) { echo ' hidden'; } ?>" aria-label="<?php esc_attr_e( 'Edit selected menu' ); ?>"><?php _e( 'Edit Menu' ); ?></button>
<?php
}
}