Skip to content

Commit b375a3f

Browse files
committed
Twenty Twenty Four: A11y: Add aria-label in default menu names.
Add missing default `aria-label` values to the hidden-sidebar, header, and footer with centered logo patterns in Twenty Twenty Four. Developed in #13763. Props joedolson, mukesh27, rahultank, nhrrob, harishtewari. Fixes #66189. git-svn-id: https://develop.svn.wordpress.org/trunk@65351 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 606ee79 commit b375a3f

4 files changed

Lines changed: 45 additions & 28 deletions

File tree

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,2 @@
1-
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"20px","bottom":"20px"}}},"backgroundColor":"base","layout":{"type":"constrained"}} -->
2-
<div class="wp-block-group alignwide has-base-background-color has-background"
3-
style="padding-top:20px;padding-bottom:20px">
4-
<!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between","flexWrap":"wrap"}} -->
5-
<div class="wp-block-group alignwide">
6-
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"},"layout":{"selfStretch":"fit","flexSize":null}},"layout":{"type":"flex"}} -->
7-
<div class="wp-block-group">
8-
<!-- wp:site-logo {"width":60 } /-->
9-
10-
<!-- wp:group {"style":{"spacing":{"blockGap":"0px"}}} -->
11-
<div class="wp-block-group">
12-
<!-- wp:site-title {"level":0} /-->
13-
</div>
14-
<!-- /wp:group -->
15-
</div>
16-
<!-- /wp:group -->
17-
18-
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"left"}} -->
19-
<div class="wp-block-group">
20-
<!-- wp:navigation {"layout":{"type":"flex","justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"},"blockGap":"var:preset|spacing|20"},"layout":{"selfStretch":"fit","flexSize":null}}} /-->
21-
</div>
22-
<!-- /wp:group -->
23-
</div>
24-
<!-- /wp:group -->
25-
</div>
26-
<!-- /wp:group -->
1+
<!-- wp:pattern {"slug":"twentytwentyfour/header"} /-->
2+

‎src/wp-content/themes/twentytwentyfour/patterns/footer-centered-logo-nav.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<!-- wp:site-logo /-->
2020

21-
<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","justifyContent":"center"},"fontSize":"small"} /-->
21+
<!-- wp:navigation {"ariaLabel":"<?php esc_attr_e( 'Footer', 'twentytwentyfour' ); ?>","overlayMenu":"never","layout":{"type":"flex","justifyContent":"center"},"fontSize":"small"} /-->
2222

2323
<!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"secondary","fontSize":"small"} -->
2424
<p class="has-text-align-center has-secondary-color has-text-color has-link-color has-small-font-size">
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* Title: Header
4+
* Slug: twentytwentyfour/header
5+
* Categories: header
6+
* Description: Site header with site title and navigation.
7+
*
8+
* @package WordPress
9+
* @subpackage Twenty_Twenty_Four
10+
* @since Twenty Twenty-Four 1.x
11+
*/
12+
13+
?>
14+
15+
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"20px","bottom":"20px"}}},"backgroundColor":"base","layout":{"type":"constrained"}} -->
16+
<div class="wp-block-group alignwide has-base-background-color has-background"
17+
style="padding-top:20px;padding-bottom:20px">
18+
<!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between","flexWrap":"wrap"}} -->
19+
<div class="wp-block-group alignwide">
20+
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"},"layout":{"selfStretch":"fit","flexSize":null}},"layout":{"type":"flex"}} -->
21+
<div class="wp-block-group">
22+
<!-- wp:site-logo {"width":60 } /-->
23+
24+
<!-- wp:group {"style":{"spacing":{"blockGap":"0px"}}} -->
25+
<div class="wp-block-group">
26+
<!-- wp:site-title {"level":0} /-->
27+
</div>
28+
<!-- /wp:group -->
29+
</div>
30+
<!-- /wp:group -->
31+
32+
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"left"}} -->
33+
<div class="wp-block-group">
34+
<!-- wp:navigation {"ariaLabel":"<?php esc_attr_e( 'Primary', 'twentytwentyfour' ); ?>","layout":{"type":"flex","justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"},"blockGap":"var:preset|spacing|20"},"layout":{"selfStretch":"fit","flexSize":null}}} /-->
35+
</div>
36+
<!-- /wp:group -->
37+
</div>
38+
<!-- /wp:group -->
39+
</div>
40+
<!-- /wp:group -->
41+

‎src/wp-content/themes/twentytwentyfour/patterns/hidden-sidebar.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</div>
6262
<!-- /wp:group -->
6363

64-
<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","orientation":"vertical"},"style":{"typography":{"fontStyle":"normal","fontWeight":"400"},"spacing":{"blockGap":"var:preset|spacing|10"}},"fontSize":"small"} -->
64+
<!-- wp:navigation {"ariaLabel":"<?php esc_attr_e( 'Sidebar', 'twentytwentyfour' ); ?>","overlayMenu":"never","layout":{"type":"flex","orientation":"vertical"},"style":{"typography":{"fontStyle":"normal","fontWeight":"400"},"spacing":{"blockGap":"var:preset|spacing|10"}},"fontSize":"small"} -->
6565
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'Latest inflation report', 'twentytwentyfour' ); ?>","url":"#","className":"is-style-arrow-link","style":{"typography":{"textDecoration":"underline"}}} /-->
6666
<!-- wp:navigation-link {"label":"<?php esc_html_e( 'Financial apps for families', 'twentytwentyfour' ); ?>","url":"#","className":"is-style-arrow-link","style":{"typography":{"textDecoration":"underline"}}} /-->
6767
<!-- /wp:navigation -->

0 commit comments

Comments
 (0)