aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/links/sharing-link/sharing-link.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-04 18:16:55 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commita724b4b38bacc631410627395b0d1190a0e8de0d (patch)
tree27bd2704fbaf2c3c7455e5cd424765df91db3d02 /src/components/atoms/links/sharing-link/sharing-link.tsx
parent0e60743d140aff66eca6df712f653ee20f5d4ef3 (diff)
feat(components): add a VisuallyHidden component
Diffstat (limited to 'src/components/atoms/links/sharing-link/sharing-link.tsx')
-rw-r--r--src/components/atoms/links/sharing-link/sharing-link.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/atoms/links/sharing-link/sharing-link.tsx b/src/components/atoms/links/sharing-link/sharing-link.tsx
index 186000e..a460a4d 100644
--- a/src/components/atoms/links/sharing-link/sharing-link.tsx
+++ b/src/components/atoms/links/sharing-link/sharing-link.tsx
@@ -1,4 +1,5 @@
import type { AnchorHTMLAttributes, FC } from 'react';
+import { VisuallyHidden } from '../../visually-hidden';
import styles from './sharing-link.module.scss';
export type SharingMedium =
@@ -44,8 +45,7 @@ export const SharingLink: FC<SharingLinkProps> = ({
return (
<a {...props} className={linkClass} href={url}>
- {/* eslint-disable-next-line -- SR class allowed */}
- <span className="screen-reader-text">{label}</span>
+ <VisuallyHidden>{label}</VisuallyHidden>
</a>
);
};