wp-includes/blocks/navigation.php:881Get the wrapper attributes
$attributesarray$inner_blocksWP_Block_Liststring private static function get_nav_attributes( $attributes, $inner_blocks ) { $is_interactive = static::is_interactive( $attributes, $inner_blocks ); $is_responsive_menu = static::is_responsive( $attributes ); $style = static::get_styles( $attributes ); $class = static::get_classes( $attributes ); $extra_attributes = array( 'class' => $class, 'style' => $style, ); // Only add aria-label for top-level navigation blocks. // Skip navigation blocks marked as being within overlay template parts. $is_within_overlay = $attributes['_isWithinOverlayTemplatePart'] ?? false; if ( $is_within_overlay ) { $nav_menu_name = static::get_navigation_name( $attributes ); } else { $nav_menu_name = static::get_unique_navigation_name( $attributes ); } if ( ! empty( $nav_menu_name ) ) { $extra_attributes['aria-label'] = $nav_menu_name; } $wrapper_attributes = get_block_wrapper_attributes( $extra_attributes ); if ( $is_responsive_menu ) { $nav_element_directives = static::get_nav_element_directives( $is_interactive ); $wrapper_attributes .= ' ' . $nav_element_directives; } return $wrapper_attributes; }Introduced in 6.5.0. Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/blocks/navigation.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.