diff --git a/packages/block-library/src/navigation/edit/index.js b/packages/block-library/src/navigation/edit/index.js index bbd632a27e56f..bc3e879632ee7 100644 --- a/packages/block-library/src/navigation/edit/index.js +++ b/packages/block-library/src/navigation/edit/index.js @@ -36,6 +36,7 @@ import { import { __, sprintf } from '@wordpress/i18n'; import { speak } from '@wordpress/a11y'; import { createBlock } from '@wordpress/blocks'; +import { close, Icon } from '@wordpress/icons'; /** * Internal dependencies @@ -465,15 +466,25 @@ function Navigation( { setOverlayMenuPreview( ! overlayMenuPreview ); } } > - { hasIcon && } - { ! hasIcon && { __( 'Menu' ) } } + { hasIcon && ( + <> + + + + ) } + { ! hasIcon && ( + <> + { __( 'Menu' ) } + { __( 'Close' ) } + + ) } ) } { overlayMenuPreview && ( setAttributes( { hasIcon: value } ) diff --git a/packages/block-library/src/navigation/edit/responsive-wrapper.js b/packages/block-library/src/navigation/edit/responsive-wrapper.js index 3e6cced93fffc..880dbec8921d3 100644 --- a/packages/block-library/src/navigation/edit/responsive-wrapper.js +++ b/packages/block-library/src/navigation/edit/responsive-wrapper.js @@ -79,7 +79,7 @@ export default function ResponsiveWrapper( { { ! isOpen && (
%9$s + '
- +
%2$s
@@ -628,13 +632,14 @@ function render_block_core_navigation( $attributes, $content, $block ) {
', esc_attr( $modal_unique_id ), $inner_blocks_html, - __( 'Open menu' ), // Open button label. - __( 'Close menu' ), // Close button label. + $toggle_aria_label_open, + $toggle_aria_label_close, esc_attr( implode( ' ', $responsive_container_classes ) ), esc_attr( implode( ' ', $open_button_classes ) ), safecss_filter_attr( $colors['overlay_inline_styles'] ), __( 'Menu' ), - $toggle_button_content + $toggle_button_content, + $toggle_close_button_content ); return sprintf( diff --git a/packages/block-library/src/navigation/style.scss b/packages/block-library/src/navigation/style.scss index 34b930442cd8f..eb681b9722924 100644 --- a/packages/block-library/src/navigation/style.scss +++ b/packages/block-library/src/navigation/style.scss @@ -613,6 +613,7 @@ button.wp-block-navigation-item__content { border: none; margin: 0; padding: 0; + text-transform: inherit; svg { fill: currentColor;