Skip to content

Commit

Permalink
fix(core): a11y fix on mobile DropdownNavbarItem
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Feb 4, 2025
1 parent a0248ed commit 15ee2a2
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 15ee2a2

Please sign in to comment.