fix: Utilise <a>
parent
632fa24e61
commit
872a90e039
|
@ -20,9 +20,7 @@ import { useIsEmbedded } from '@/components/utils/useIsEmbedded'
|
|||
import { Container, Spacing } from '@/design-system/layout'
|
||||
|
||||
import Provider, { ProviderProps } from './Provider'
|
||||
import { Link } from './design-system/typography/link'
|
||||
import { useAxeCoreAnalysis } from './hooks/useAxeCoreAnalysis'
|
||||
import { useGetFullPath } from './hooks/useGetFullPath'
|
||||
import { useSaveAndRestoreScrollPosition } from './hooks/useSaveAndRestoreScrollPosition'
|
||||
import Accessibilité from './pages/Accessibilité'
|
||||
import Budget from './pages/Budget/Budget'
|
||||
|
@ -99,8 +97,6 @@ const App = () => {
|
|||
|
||||
const { t } = useTranslation()
|
||||
|
||||
const fullPath = useGetFullPath()
|
||||
|
||||
useSaveAndRestoreScrollPosition()
|
||||
const isEmbedded = useIsEmbedded()
|
||||
if (!import.meta.env.PROD && import.meta.env.VITE_AXE_CORE_ENABLED) {
|
||||
|
@ -113,9 +109,9 @@ const App = () => {
|
|||
return (
|
||||
<StyledLayout isEmbedded={isEmbedded}>
|
||||
{!isEmbedded && <Header />}
|
||||
<Link href={`${fullPath}#footer`} className="skip-link print-hidden">
|
||||
<a href="#footer" className="skip-link print-hidden">
|
||||
{t('Passer le contenu')}
|
||||
</Link>
|
||||
</a>
|
||||
<main role="main" id="main">
|
||||
<Container>
|
||||
<ErrorBoundary fallback={CatchOffline}>
|
||||
|
|
|
@ -9,7 +9,6 @@ import { Container } from '@/design-system/layout'
|
|||
import { Switch } from '@/design-system/switch'
|
||||
import { Link } from '@/design-system/typography/link'
|
||||
import { useDarkMode } from '@/hooks/useDarkMode'
|
||||
import { useGetFullPath } from '@/hooks/useGetFullPath'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
|
||||
import NewsBanner from './NewsBanner'
|
||||
|
@ -17,8 +16,6 @@ import NewsBanner from './NewsBanner'
|
|||
export default function Header() {
|
||||
const { absoluteSitePaths } = useSitePaths()
|
||||
|
||||
const fullPath = useGetFullPath()
|
||||
|
||||
const {
|
||||
i18n: { language },
|
||||
t,
|
||||
|
@ -28,9 +25,9 @@ export default function Header() {
|
|||
|
||||
return (
|
||||
<header role="banner">
|
||||
<Link href={`${fullPath}#main`} className="skip-link">
|
||||
<a href="#main" className="skip-link print-hidden">
|
||||
{t('Aller au contenu')}
|
||||
</Link>
|
||||
</a>
|
||||
<Container>
|
||||
<StyledHeader role="banner">
|
||||
<Link
|
||||
|
|
|
@ -14,7 +14,7 @@ export const useGetFullPath = () => {
|
|||
|
||||
const language = i18n.language as 'fr' | 'en'
|
||||
|
||||
const pathStart = isDevelopment() ? DEVELOPMENT_BASE_PATHS[language] : '/'
|
||||
const pathStart = isDevelopment() ? DEVELOPMENT_BASE_PATHS[language] : ''
|
||||
|
||||
return `${pathStart}${pathname !== '/' ? pathname : ''}`
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ import { Container, Grid, Spacing } from '@/design-system/layout'
|
|||
import { H2 } from '@/design-system/typography/heading'
|
||||
import { Link } from '@/design-system/typography/link'
|
||||
import { Body, Intro } from '@/design-system/typography/paragraphs'
|
||||
import { useGetFullPath } from '@/hooks/useGetFullPath'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
|
||||
import { TrackPage } from '../../ATInternetTracking'
|
||||
|
@ -25,8 +24,6 @@ export default function Landing() {
|
|||
const { absoluteSitePaths } = useSitePaths()
|
||||
const { t } = useTranslation()
|
||||
|
||||
const fullPath = useGetFullPath()
|
||||
|
||||
return (
|
||||
<>
|
||||
<TrackPage chapter1="informations" name="accueil" />
|
||||
|
@ -37,9 +34,9 @@ export default function Landing() {
|
|||
ogImage="/logo-share.png"
|
||||
/>
|
||||
<Header />
|
||||
<Link href={`${fullPath}#footer`} className="skip-link print-hidden">
|
||||
<a href="#footer" className="skip-link print-hidden">
|
||||
{t('Passer le contenu')}
|
||||
</Link>
|
||||
</a>
|
||||
<main role="main" id="main">
|
||||
<Container>
|
||||
<PageHeader
|
||||
|
|
Loading…
Reference in New Issue