Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: menu dropdown aria attribute #4020 #4053

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
preda-bogdan marked this conversation as resolved.
Show resolved Hide resolved

/**
* 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