mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-30 10:48:05 +02:00
fix(core): a11y fix on mobile DropdownNavbarItem (#10898)
This commit is contained in:
parent
b76f0feadc
commit
3fde4a0d6a
1 changed files with 4 additions and 0 deletions
|
@ -151,6 +151,10 @@ function DropdownNavbarItemMobile({
|
||||||
'menu__link menu__link--sublist menu__link--sublist-caret',
|
'menu__link menu__link--sublist menu__link--sublist-caret',
|
||||||
className,
|
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}
|
{...props}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
Loading…
Add table
Reference in a new issue