Skip to content

Commit

Permalink
fix(core): a11y fix on mobile DropdownNavbarItem (#10898)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Feb 6, 2025
1 parent b76f0fe commit 3fde4a0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ function DropdownNavbarItemMobile({
'menu__link menu__link--sublist menu__link--sublist-caret',
className,
)}
// # hash permits to make the <a> tag focusable in case no link target
// See https://github.com/facebook/docusaurus/pull/6003
// There's probably a better solution though...
href={props.to ? undefined : '#'}
{...props}
onClick={(e) => {
e.preventDefault();
Expand Down

0 comments on commit 3fde4a0

Please sign in to comment.