Skip to content

Commit

Permalink
fix(v2): classic theme - semantic correct anchors links (facebook#5080)
Browse files Browse the repository at this point in the history
* fix(v2): semantic correct anchors

* chore: ignore linting
  • Loading branch information
AuHau authored Jun 30, 2021
1 parent c3127b6 commit 823b020
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,15 @@ 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,
'menu__link--active': collapsible && isActive,
[styles.menuLinkText]: !collapsible,
})}
onClick={collapsible ? handleItemClick : undefined}
href={collapsible ? '#!' : undefined}
href={collapsible ? '#' : undefined}
{...props}>
{label}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit 823b020

Please sign in to comment.