Skip to content

Commit

Permalink
A11y: add missing href attribute for manager main nav to ensure oncli…
Browse files Browse the repository at this point in the history
…ck fires on keyboard navigation modxcms#16612
  • Loading branch information
jenswittmann authored and opengeek committed Sep 23, 2024
1 parent d3b4f32 commit 24fb76d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manager/controllers/default/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function processSubMenus(&$output, array $menus = [])
$attributes = ' href="?a='.$menu['action'].$menu['params'].'"';
}
if (!empty($menu['handler'])) {
$attributes .= ' onclick="{literal} '.str_replace('"','\'',$menu['handler']).'{/literal} "';
$attributes .= ' href="javascript:;" onclick="{literal} '.str_replace('"','\'',$menu['handler']).'{/literal} "';
}
$menu['icon'] = $menu['icon'] ?? '';
$smTpl .= '<a'.$attributes.' tabindex="0">'.$menu['text'].$menu['icon'].$description.'</a>'."\n";
Expand Down

0 comments on commit 24fb76d

Please sign in to comment.