Make WordPress Core

Changeset 58438


Ignore:
Timestamp:
06/18/2024 02:50:16 PM (4 months ago)
Author:
hellofromTonya
Message:

Toolbar: Fix ARIA [role] on menu descendants.

Adds a role="group" to the WordPress admin bar menu list items to fix the following accessibility issue:

Elements with an ARIA [role] that require children to contain a specific [role] are missing some or all of those required children.

Reference:

Follow-up to [42128], [21193], [19558].

Props heinperu, joedolson, krupajnanda, rajinsharwar, rcreators, sabernhardt.
Fixes #60919.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-admin-bar.php

    r58215 r58438  
    576576        }
    577577
    578         echo "<li id='" . esc_attr( 'wp-admin-bar-' . $node->id ) . "'$menuclass>";
     578        echo "<li role='group' id='" . esc_attr( 'wp-admin-bar-' . $node->id ) . "'$menuclass>";
    579579
    580580        if ( $has_link ) {
Note: See TracChangeset for help on using the changeset viewer.