Make WordPress Core


Ignore:
Timestamp:
06/20/2024 07:39:50 PM (4 months ago)
Author:
joedolson
Message:

Administration: A11y: Use aria-haspopup only if item has popup behavior.

Update behavior of admin menu so that the aria-haspopup attribute is only applied in responsive mode, when there is a popup behavior present. Add aria-expanded attributes to report current popup state.

Props afercia, khokansardar, ryokuhi, joedolson.
Fixes #43095.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/menu-header.php

    r56175 r58449  
    9999            $class[] = 'wp-not-current-submenu';
    100100            if ( ! empty( $submenu_items ) ) {
    101                 $aria_attributes .= 'aria-haspopup="true"';
     101                $aria_attributes .= 'data-ariahaspopup';
    102102            }
    103103        }
Note: See TracChangeset for help on using the changeset viewer.