Skip to content

Commit

Permalink
fix: menu dropdown aria attribute #4020
Browse files Browse the repository at this point in the history
  • Loading branch information
preda-bogdan committed Jul 28, 2023
1 parent 4b4aeb1 commit 4a37a0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/views/nav_walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

use HFG\Core\Components\Nav;
use Neve\Core\Dynamic_Css;
use function _PHPStan_bcbc46924\RingCentral\Psr7\str;

/**
* Class Nav_Walker
Expand Down Expand Up @@ -151,7 +152,7 @@ public function add_caret( $title, $item, $args, $depth ) {
$expand_dropdowns = apply_filters( 'neve_first_level_expanded', false );
$additional_class = $expand_dropdowns && $depth === 0 ? 'dropdown-open' : '';

$caret = '<button ' . $expanded . ' type="button" class="caret-wrap navbar-toggle ' . esc_attr( (string) $item->menu_order ) . ' ' . esc_attr( $additional_class ) . '" style="' . esc_attr( $caret_wrap_css ) . '">';
$caret = '<button ' . $expanded . ' type="button" class="caret-wrap navbar-toggle ' . esc_attr( (string) $item->menu_order ) . ' ' . esc_attr( $additional_class ) . '" style="' . esc_attr( $caret_wrap_css ) . '" aria-label="' . __( 'Toggle', 'neve' ) . ' ' . wp_filter_nohtml_kses( $title ) . '">';
$caret .= $caret_pictogram;
$caret .= '</button>';

Expand Down

0 comments on commit 4a37a0e

Please sign in to comment.