fix: Corrige liens, modal

pull/2573/head
Benjamin Arias 2023-03-13 12:46:20 +01:00 committed by Jérémy Rialland
parent e4a54c7798
commit 8f03e42b1d
6 changed files with 18 additions and 6 deletions

View File

@ -116,7 +116,13 @@ const App = () => {
{!isEmbedded && <Header />}
<main role="main" id="main">
<a href={`${fullURL}#footer`} className="skip-link print-hidden">
<a
href={`${fullURL}#footer`}
aria-label={t(
'Passer le contenu principal et aller directement au pied de page'
)}
className="skip-link print-hidden"
>
{t('Passer le contenu')}
</a>
<Container>

View File

@ -129,8 +129,6 @@ export default function FeedbackForm({
{isSubmittedSuccessfully && <FeedbackThankYouContent />}
{!isSubmittedSuccessfully && (
<>
<H1 style={{ marginTop: '1rem' }}>{title}</H1>
<StyledFeedback>
<form
onSubmit={(e) => {

View File

@ -177,6 +177,11 @@ const FeedbackButton = ({ isEmbedded }: { isEmbedded?: boolean }) => {
setIsShowingSuggestionForm(false)
setTimeout(() => setIsFormOpen(false))
}}
title={
isNotSatisfied
? t('Vos attentes ne sont pas remplies')
: t('Votre avis nous intéresse')
}
>
<FeedbackForm
infoSlot={

View File

@ -29,7 +29,7 @@ export default function Header() {
return (
<header role="banner">
<a href={`${fullURL}#main`} className="skip-link print-hidden">
{t('Aller au contenu')}
{t('Aller au contenu principal')}
</a>
<Container>
<StyledHeader>

View File

@ -72,9 +72,10 @@ export default function Popover(
if (offsetTop === undefined) {
return null
}
console.log({ title, titleProps })
return (
<OverlayContainer>
<OverlayContainer aria-modal={true}>
<Underlay {...underlayProps} $offsetTop={offsetTop}>
<Container>
<Grid
@ -98,6 +99,7 @@ export default function Popover(
{...overlayProps}
$offsetTop={offsetTop}
ref={ref}
aria-label={title}
>
{props.isDismissable && (
<CloseButtonContainer>

View File

@ -69,6 +69,7 @@ export const Link = React.forwardRef<
children: React.ReactNode
isDisabled?: boolean
noUnderline?: boolean
to?: string
}
>(function Link(props, forwardedRef) {
const { isDisabled, role, noUnderline, ...ariaButtonProps } = props
@ -77,7 +78,7 @@ export const Link = React.forwardRef<
return (
<StyledLink
{...buttonOrLinkProps}
role={role || buttonOrLinkProps?.role}
role={role || (props.href || props.to ? undefined : 'button')}
type={undefined}
$isDisabled={isDisabled}
$noUnderline={noUnderline}