Skip to content

Commit 27173be

Browse files
added role of menuitem to submenu parent li, added tabindex of zero to the same element for accessibility
1 parent 1783ea3 commit 27173be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

understrap-multilevel-bootstrap-nav-walker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
172172
$id = apply_filters('nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args, $depth);
173173
$id = $id ? ' id="' . esc_attr($id) . '"' : '';
174174

175-
$output .= $indent . '<li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement"' . $id . $class_names . '>';
175+
$output .= $indent . '<li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement"' . $id . $class_names . ' role="menuitem" tabindex="0">';
176176

177177
// initialize array for holding the $atts for the link item.
178178
$atts = array();

0 commit comments

Comments
 (0)