From 6226cb9903bfcf0395d2c26b0030e80de5ea9a61 Mon Sep 17 00:00:00 2001 From: Victor Zeinstra Date: Thu, 9 Jan 2025 16:17:48 +0100 Subject: [PATCH] fix: rgaa review 1 (#6383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * titre article lié et partage en h2 * fix: feedback answer focus * fix: utiliser même intitulé dans le titre du lien que dans le children * chore: snap --------- Co-authored-by: victor --- .../src/modules/common/RelatedItems.tsx | 2 +- .../src/modules/common/Share.tsx | 2 +- .../__tests__/__snapshots__/RelatedItems.test.tsx.snap | 4 ++-- .../common/__tests__/__snapshots__/Share.test.tsx.snap | 2 +- .../src/modules/layout/feedback/FeedbackAnswered.tsx | 9 ++++++++- .../__snapshots__/FeedbackAnswered.test.tsx.snap | 1 + .../__tests__/__snapshots__/modeles.test.tsx.snap | 2 +- .../src/modules/privacy-policy/index.tsx | 2 +- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/code-du-travail-frontend/src/modules/common/RelatedItems.tsx b/packages/code-du-travail-frontend/src/modules/common/RelatedItems.tsx index 718576f06f..eb8b1dc8a7 100644 --- a/packages/code-du-travail-frontend/src/modules/common/RelatedItems.tsx +++ b/packages/code-du-travail-frontend/src/modules/common/RelatedItems.tsx @@ -26,7 +26,7 @@ export const RelatedItems = ({
{title} :
diff --git a/packages/code-du-travail-frontend/src/modules/common/Share.tsx b/packages/code-du-travail-frontend/src/modules/common/Share.tsx index be0384d8d5..bfa46d2e19 100644 --- a/packages/code-du-travail-frontend/src/modules/common/Share.tsx +++ b/packages/code-du-travail-frontend/src/modules/common/Share.tsx @@ -24,7 +24,7 @@ export const Share = ({ title, metaDescription }: Props): JSX.Element => { return (
-
+
Partager la page
    diff --git a/packages/code-du-travail-frontend/src/modules/common/__tests__/__snapshots__/RelatedItems.test.tsx.snap b/packages/code-du-travail-frontend/src/modules/common/__tests__/__snapshots__/RelatedItems.test.tsx.snap index 5a6a8aad62..27f95a6b15 100644 --- a/packages/code-du-travail-frontend/src/modules/common/__tests__/__snapshots__/RelatedItems.test.tsx.snap +++ b/packages/code-du-travail-frontend/src/modules/common/__tests__/__snapshots__/RelatedItems.test.tsx.snap @@ -7,7 +7,7 @@ exports[` should render 1`] = ` >
    @@ -51,7 +51,7 @@ exports[` should render 1`] = `
    diff --git a/packages/code-du-travail-frontend/src/modules/common/__tests__/__snapshots__/Share.test.tsx.snap b/packages/code-du-travail-frontend/src/modules/common/__tests__/__snapshots__/Share.test.tsx.snap index cc6cc2748c..fae0cb6ca9 100644 --- a/packages/code-du-travail-frontend/src/modules/common/__tests__/__snapshots__/Share.test.tsx.snap +++ b/packages/code-du-travail-frontend/src/modules/common/__tests__/__snapshots__/Share.test.tsx.snap @@ -6,7 +6,7 @@ exports[` renders 1`] = ` class="fr-follow__social" >
    diff --git a/packages/code-du-travail-frontend/src/modules/layout/feedback/FeedbackAnswered.tsx b/packages/code-du-travail-frontend/src/modules/layout/feedback/FeedbackAnswered.tsx index 34e3d4d9e2..169346638d 100644 --- a/packages/code-du-travail-frontend/src/modules/layout/feedback/FeedbackAnswered.tsx +++ b/packages/code-du-travail-frontend/src/modules/layout/feedback/FeedbackAnswered.tsx @@ -1,9 +1,16 @@ import { fr } from "@codegouvfr/react-dsfr"; +import { useEffect, useState } from "react"; export const FeedbackAnswered = () => { + const [titleRef, setTitleRef] = useState(); + useEffect(() => { + titleRef?.focus(); + }, [titleRef]); return ( <> -

    Merci pour votre réponse.

    +

    + Merci pour votre réponse. +

    L’équipe du Code du travail numérique vous remercie pour votre réponse.

    diff --git a/packages/code-du-travail-frontend/src/modules/layout/feedback/__tests__/__snapshots__/FeedbackAnswered.test.tsx.snap b/packages/code-du-travail-frontend/src/modules/layout/feedback/__tests__/__snapshots__/FeedbackAnswered.test.tsx.snap index 6a2d735b5d..e0b7f5a058 100644 --- a/packages/code-du-travail-frontend/src/modules/layout/feedback/__tests__/__snapshots__/FeedbackAnswered.test.tsx.snap +++ b/packages/code-du-travail-frontend/src/modules/layout/feedback/__tests__/__snapshots__/FeedbackAnswered.test.tsx.snap @@ -4,6 +4,7 @@ exports[` should match snapshot 1`] = `

    Merci pour votre réponse.

    diff --git a/packages/code-du-travail-frontend/src/modules/modeles-de-courriers/__tests__/__snapshots__/modeles.test.tsx.snap b/packages/code-du-travail-frontend/src/modules/modeles-de-courriers/__tests__/__snapshots__/modeles.test.tsx.snap index a80e7dff89..dbd8ae94bb 100644 --- a/packages/code-du-travail-frontend/src/modules/modeles-de-courriers/__tests__/__snapshots__/modeles.test.tsx.snap +++ b/packages/code-du-travail-frontend/src/modules/modeles-de-courriers/__tests__/__snapshots__/modeles.test.tsx.snap @@ -307,7 +307,7 @@ exports[` affiche un modèle de document 1`] = ` class="fr-follow__social" >
    diff --git a/packages/code-du-travail-frontend/src/modules/privacy-policy/index.tsx b/packages/code-du-travail-frontend/src/modules/privacy-policy/index.tsx index d51952b89c..a2546c1732 100644 --- a/packages/code-du-travail-frontend/src/modules/privacy-policy/index.tsx +++ b/packages/code-du-travail-frontend/src/modules/privacy-policy/index.tsx @@ -63,7 +63,7 @@ export const PrivacyPolicy = () => { Vous êtes également en droit de saisir la Commission Nationale de l’Informatique et des Libertés pour toute réclamation à{" "}