mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 04:37:28 +02:00
fix(v2): classic theme - semantic correct anchors links (#5080)
* fix(v2): semantic correct anchors * chore: ignore linting
This commit is contained in:
parent
c3127b65d1
commit
823b020c34
2 changed files with 4 additions and 2 deletions
|
@ -128,6 +128,7 @@ function DocSidebarItemCategory({
|
|||
className={clsx('menu__list-item', {
|
||||
'menu__list-item--collapsed': collapsed,
|
||||
})}>
|
||||
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
||||
<a
|
||||
className={clsx('menu__link', {
|
||||
'menu__link--sublist': collapsible,
|
||||
|
@ -135,7 +136,7 @@ function DocSidebarItemCategory({
|
|||
[styles.menuLinkText]: !collapsible,
|
||||
})}
|
||||
onClick={collapsible ? handleItemClick : undefined}
|
||||
href={collapsible ? '#!' : undefined}
|
||||
href={collapsible ? '#' : undefined}
|
||||
{...props}>
|
||||
{label}
|
||||
</a>
|
||||
|
|
|
@ -41,7 +41,8 @@ function SkipToContent(): JSX.Element {
|
|||
|
||||
return (
|
||||
<div ref={containerRef}>
|
||||
<a href="#main" className={styles.skipToContent} onClick={handleSkip}>
|
||||
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
||||
<a href="#" className={styles.skipToContent} onClick={handleSkip}>
|
||||
<Translate
|
||||
id="theme.common.skipToMainContent"
|
||||
description="The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation">
|
||||
|
|
Loading…
Add table
Reference in a new issue