From 242931964840c8ba3aad469e8f3912d42475376e Mon Sep 17 00:00:00 2001 From: "Stephen A. Bernhardt" Date: Tue, 3 Feb 2026 16:26:01 -0600 Subject: [PATCH] Create text string for invalid menu ID, and add `id` and `aria-describedby` for checkboxes --- src/wp-admin/nav-menus.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/nav-menus.php b/src/wp-admin/nav-menus.php index b5328c4b62bb4..8da675c9a2375 100644 --- a/src/wp-admin/nav-menus.php +++ b/src/wp-admin/nav-menus.php @@ -1200,7 +1200,8 @@ function wp_nav_menu_max_depth( $classes ) { $description ) : - $checked = false; + $checked = false; + $location_set = ''; if ( isset( $menu_locations[ $location ] ) && 0 !== $nav_menu_selected_id @@ -1208,17 +1209,23 @@ function wp_nav_menu_max_depth( $classes ) { ) { $checked = true; } + + if ( ! empty( $menu_locations[ $location ] ) + && $menu_locations[ $location ] !== $nav_menu_selected_id + ) { + $location_set = ' aria-describedby="theme-location-set-' . esc_attr( $location ) . '"'; + } ?>