Opened 7 weeks ago
Closed 11 days ago
#66195 closed defect (bug) (fixed)
Twenty Twenty Three: add aria-label to default primary menu
| Reported by: | joedolson | Owned by: | joedolson |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2 |
| Component: | Bundled Theme | Version: | |
| Severity: | normal | Keywords: | commit |
| Cc: | Focuses: | accessibility |
Description
Part of the process of moving bundled themes to meet new accessibility-ready standards.
Add an aria-label for the default primary menu.
Attachments (2)
Change History (19)
This ticket was mentioned in PR #13780 on WordPress/wordpress-develop by @joedolson.
7 weeks ago
#2
- Keywords has-patch added
@mukesh27 commented on PR #13780:
7 weeks ago
#3
Seems it shows PHP code instead of label.
#4
@
6 weeks ago
Patch Testing Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/13780
Environment
- WordPress: 7.1.2 with Twenty Twenty-Three 1.7 from WordPress.org (before) / trunk with PR #13780 (after), both in WordPress Playground
- Browser: Google Chrome 153.0.8010.52
- OS: Linux
- Theme: Twenty Twenty-Three 1.7
- MU Plugins: None
- Plugins: None
Steps taken
- Activated Twenty Twenty-Three.
- Opened the front page and inspected the header navigation <nav> element.
- Repeated the same steps with the patch applied.
- ❌ Patch is not solving the problem yet.
Results
- Before the patch: the header <nav> has no aria-label attribute.
- With the patch: the header <nav> has aria-label="<?php esc_html_e( 'Primary', 'twentytwentythree' ); ?>", so the PHP code is output as the label text instead of "Primary". This matches comment:3 on the PR.
Expected result
The header <nav> has a translatable accessible name, for example aria-label="Primary".
Additional Notes
parts/header.html is a block template part, and PHP is not executed in .html template files, so esc_html_e() is saved as a literal string in the ariaLabel attribute.
Screenshots/Screencast with results
This ticket was mentioned in PR #14091 on WordPress/wordpress-develop by @mukesh27.
5 weeks ago
#5
@mukesh27 commented on PR #14091:
5 weeks ago
#6
@mukesh27 commented on PR #13780:
5 weeks ago
#7
Closing in favour of #14091. Feel free to reopen.
This ticket was mentioned in PR #14629 on WordPress/wordpress-develop by @mukesh27.
3 weeks ago
#10
Trac ticket:
Use of AI Tools
N/A
@joedolson commented on PR #14629:
3 weeks ago
#11
This seems like a very straightforward fix to me; I'd like to hear @tjcafferkey confirm that it resolves the Woo issue, however.
#12
@
3 weeks ago
- Resolution fixed
- Status closed → reopened
Re-opening to address concerns raised by Woo about their ability to extend the header.
@codebytom commented on PR #14629:
3 weeks ago
#13
hey both, doesn't seem to fix the issue. you can test this yourselves by simply installing WooCommerce and activating the TT3 theme.
I believe the issue will be fixed if you add the category header to the pattern meta.
thanks!


Trac ticket: https://core.trac.wordpress.org/ticket/66195
Use of AI Tools