Skip to content

Commit 098fe1d

Browse files
committed
Twenty Twenty Three: Add aria-label to primary menu.
HTML templates can't contain translatable strings, and the primary menu needs a default ARIA label. Move the primary navigation into a hidden pattern and add the ARIA label. Developed in #14091. Props joedolson, rahultank, mukesh27, dhruvang21. Fixes #66195. git-svn-id: https://develop.svn.wordpress.org/trunk@64303 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f3b5e8a commit 098fe1d

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎src/wp-content/themes/twentytwentythree/parts/header.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- wp:site-title {"level":0} /-->
66
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"left"}} -->
77
<div class="wp-block-group">
8-
<!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right"}} /-->
8+
<!-- wp:pattern {"slug":"twentytwentythree/hidden-navigation"} /-->
99
</div>
1010
<!-- /wp:group -->
1111
</div>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
/**
3+
* Title: Hidden Navigation
4+
* Slug: twentytwentythree/hidden-navigation
5+
* Inserter: no
6+
*
7+
* @package WordPress
8+
* @subpackage Twenty_Twenty_Three
9+
* @since Twenty Twenty-Three 1.8
10+
*/
11+
12+
?>
13+
14+
<!-- wp:navigation {"ariaLabel":"<?php esc_attr_e( 'Primary', 'twentytwentythree' ); ?>","layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right"}} /-->

0 commit comments

Comments
 (0)