fix(BOOK-468): Added inert attribute to SidePeekSEO element to ignore tab navigation and screen readers
Approved-by: Linus Flood
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import type { SidePeekSelfControlledProps } from './sidePeek'
|
||||
|
||||
// Sidepeeks generally have important content that should be indexed by search engines.
|
||||
// The content is hidden behind a modal, but it is still important for SEO.
|
||||
// This component is used to provide SEO information for the sidepeek content.
|
||||
export default function SidePeekSEO({
|
||||
title,
|
||||
children,
|
||||
}: React.PropsWithChildren<Pick<SidePeekSelfControlledProps, 'title'>>) {
|
||||
return (
|
||||
<div className="sr-only">
|
||||
<h2>{title}</h2>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import { IconButton } from '../../IconButton'
|
||||
import { MaterialIcon } from '../../Icons/MaterialIcon'
|
||||
import { Typography } from '../../Typography'
|
||||
|
||||
import SidePeekSEO from './SidePeekSEO'
|
||||
import SidePeekSEO from '../SidePeekSEO'
|
||||
|
||||
import styles from './sidePeekSelfControlled.module.css'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user