@@ -97,15 +97,13 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role() {
9797 $ node_site_name = $ wp_admin_bar ->get_node ( 'site-name ' );
9898 $ node_my_account = $ wp_admin_bar ->get_node ( 'my-account ' );
9999 $ node_user_info = $ wp_admin_bar ->get_node ( 'user-info ' );
100- $ node_edit_profile = $ wp_admin_bar ->get_node ( 'edit-profile ' );
101100
102101 // Site menu points to the home page instead of the admin URL.
103102 $ this ->assertSame ( home_url ( '/ ' ), $ node_site_name ->href );
104103
105104 // No profile links as the user doesn't have any permissions on the site.
106105 $ this ->assertFalse ( $ node_my_account ->href );
107106 $ this ->assertFalse ( $ node_user_info ->href );
108- $ this ->assertNull ( $ node_edit_profile );
109107 }
110108
111109 /**
@@ -119,10 +117,9 @@ public function test_admin_bar_contains_correct_links_for_users_with_role() {
119117
120118 $ wp_admin_bar = $ this ->get_standard_admin_bar ();
121119
122- $ node_site_name = $ wp_admin_bar ->get_node ( 'site-name ' );
123- $ node_my_account = $ wp_admin_bar ->get_node ( 'my-account ' );
124- $ node_user_info = $ wp_admin_bar ->get_node ( 'user-info ' );
125- $ node_edit_profile = $ wp_admin_bar ->get_node ( 'edit-profile ' );
120+ $ node_site_name = $ wp_admin_bar ->get_node ( 'site-name ' );
121+ $ node_my_account = $ wp_admin_bar ->get_node ( 'my-account ' );
122+ $ node_user_info = $ wp_admin_bar ->get_node ( 'user-info ' );
126123
127124 // Site menu points to the admin URL.
128125 $ this ->assertSame ( admin_url ( '/ ' ), $ node_site_name ->href );
@@ -132,7 +129,6 @@ public function test_admin_bar_contains_correct_links_for_users_with_role() {
132129 // Profile URLs point to profile.php.
133130 $ this ->assertSame ( $ profile_url , $ node_my_account ->href );
134131 $ this ->assertSame ( $ profile_url , $ node_user_info ->href );
135- $ this ->assertSame ( $ profile_url , $ node_edit_profile ->href );
136132 }
137133
138134 /**
@@ -162,7 +158,6 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_
162158 $ node_site_name = $ wp_admin_bar ->get_node ( 'site-name ' );
163159 $ node_my_account = $ wp_admin_bar ->get_node ( 'my-account ' );
164160 $ node_user_info = $ wp_admin_bar ->get_node ( 'user-info ' );
165- $ node_edit_profile = $ wp_admin_bar ->get_node ( 'edit-profile ' );
166161
167162 // Get primary blog.
168163 $ primary = get_active_blog_for_user ( self ::$ editor_id );
@@ -179,7 +174,6 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_
179174 // Profile URLs should go to the user's primary blog.
180175 $ this ->assertSame ( $ primary_profile_url , $ node_my_account ->href );
181176 $ this ->assertSame ( $ primary_profile_url , $ node_user_info ->href );
182- $ this ->assertSame ( $ primary_profile_url , $ node_edit_profile ->href );
183177
184178 restore_current_blog ();
185179 }
@@ -218,7 +212,6 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_
218212 $ node_site_name = $ wp_admin_bar ->get_node ( 'site-name ' );
219213 $ node_my_account = $ wp_admin_bar ->get_node ( 'my-account ' );
220214 $ node_user_info = $ wp_admin_bar ->get_node ( 'user-info ' );
221- $ node_edit_profile = $ wp_admin_bar ->get_node ( 'edit-profile ' );
222215
223216 // Get primary blog.
224217 $ primary = get_active_blog_for_user ( self ::$ no_role_id );
@@ -234,7 +227,6 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_
234227 // Profile URLs should go to the user's primary blog.
235228 $ this ->assertSame ( $ user_profile_url , $ node_my_account ->href );
236229 $ this ->assertSame ( $ user_profile_url , $ node_user_info ->href );
237- $ this ->assertSame ( $ user_profile_url , $ node_edit_profile ->href );
238230
239231 restore_current_blog ();
240232 }
@@ -284,63 +276,63 @@ public function data_admin_bar_nodes_with_tabindex_meta() {
284276 array (
285277 'id ' => 'test-node ' ,
286278 ),
287- '<div class="ab-item ab-empty-item"> ' ,
279+ '<div class="ab-item ab-empty-item" role="menuitem" > ' ,
288280 ),
289281 array (
290282 // Empty string.
291283 array (
292284 'id ' => 'test-node ' ,
293285 'meta ' => array ( 'tabindex ' => '' ),
294286 ),
295- '<div class="ab-item ab-empty-item"> ' ,
287+ '<div class="ab-item ab-empty-item" role="menuitem" > ' ,
296288 ),
297289 array (
298290 // Integer 1 as string.
299291 array (
300292 'id ' => 'test-node ' ,
301293 'meta ' => array ( 'tabindex ' => '1 ' ),
302294 ),
303- '<div class="ab-item ab-empty-item" tabindex="1"> ' ,
295+ '<div class="ab-item ab-empty-item" tabindex="1" role="menuitem" > ' ,
304296 ),
305297 array (
306298 // Integer -1 as string.
307299 array (
308300 'id ' => 'test-node ' ,
309301 'meta ' => array ( 'tabindex ' => '-1 ' ),
310302 ),
311- '<div class="ab-item ab-empty-item" tabindex="-1"> ' ,
303+ '<div class="ab-item ab-empty-item" tabindex="-1" role="menuitem" > ' ,
312304 ),
313305 array (
314306 // Integer 0 as string.
315307 array (
316308 'id ' => 'test-node ' ,
317309 'meta ' => array ( 'tabindex ' => '0 ' ),
318310 ),
319- '<div class="ab-item ab-empty-item" tabindex="0"> ' ,
311+ '<div class="ab-item ab-empty-item" tabindex="0" role="menuitem" > ' ,
320312 ),
321313 array (
322314 // Integer, 0.
323315 array (
324316 'id ' => 'test-node ' ,
325317 'meta ' => array ( 'tabindex ' => 0 ),
326318 ),
327- '<div class="ab-item ab-empty-item" tabindex="0"> ' ,
319+ '<div class="ab-item ab-empty-item" tabindex="0" role="menuitem" > ' ,
328320 ),
329321 array (
330322 // Integer, 2.
331323 array (
332324 'id ' => 'test-node ' ,
333325 'meta ' => array ( 'tabindex ' => 2 ),
334326 ),
335- '<div class="ab-item ab-empty-item" tabindex="2"> ' ,
327+ '<div class="ab-item ab-empty-item" tabindex="2" role="menuitem" > ' ,
336328 ),
337329 array (
338330 // Boolean, false.
339331 array (
340332 'id ' => 'test-node ' ,
341333 'meta ' => array ( 'tabindex ' => false ),
342334 ),
343- '<div class="ab-item ab-empty-item"> ' ,
335+ '<div class="ab-item ab-empty-item" role="menuitem" > ' ,
344336 ),
345337 );
346338 }
0 commit comments