From 9373300764049087800413ba4627f667eb202116 Mon Sep 17 00:00:00 2001 From: Pierre Ecarlat <pecarlat@grandlyon.com> Date: Mon, 2 Sep 2024 11:54:27 +0000 Subject: [PATCH] fix(a11y): Added autoComplete types to TextFields --- src/components/Connection/SGEConnect/StepIdentityAndPdl.tsx | 2 ++ .../SGEConnect/__snapshots__/SgeConnectView.spec.tsx.snap | 2 ++ .../SGEConnect/__snapshots__/StepIdentityAndPdl.spec.tsx.snap | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/components/Connection/SGEConnect/StepIdentityAndPdl.tsx b/src/components/Connection/SGEConnect/StepIdentityAndPdl.tsx index d4270b31a..25d988740 100644 --- a/src/components/Connection/SGEConnect/StepIdentityAndPdl.tsx +++ b/src/components/Connection/SGEConnect/StepIdentityAndPdl.tsx @@ -34,6 +34,7 @@ const StepIdentityAndPdl = ({ value={sgeState.firstName} onChange={e => onChange('firstName', e.target.value)} required + autoComplete="given-name" /> <TextField label={t('auth.enedissgegrandlyon.lastName')} @@ -43,6 +44,7 @@ const StepIdentityAndPdl = ({ value={sgeState.lastName} onChange={e => onChange('lastName', e.target.value)} required + autoComplete="family-name" /> <h2 className="text-22-bold">{t('auth.enedissgegrandlyon.pdlTitle')}</h2> <TextField diff --git a/src/components/Connection/SGEConnect/__snapshots__/SgeConnectView.spec.tsx.snap b/src/components/Connection/SGEConnect/__snapshots__/SgeConnectView.spec.tsx.snap index 94a59e9e8..35d1e2900 100644 --- a/src/components/Connection/SGEConnect/__snapshots__/SgeConnectView.spec.tsx.snap +++ b/src/components/Connection/SGEConnect/__snapshots__/SgeConnectView.spec.tsx.snap @@ -116,6 +116,7 @@ exports[`SgeConnectView component should be rendered correctly 1`] = ` > <input aria-invalid="false" + autocomplete="given-name" class="MuiInputBase-input MuiOutlinedInput-input" id="firstName" required="" @@ -160,6 +161,7 @@ exports[`SgeConnectView component should be rendered correctly 1`] = ` > <input aria-invalid="false" + autocomplete="family-name" class="MuiInputBase-input MuiOutlinedInput-input" id="lastName" required="" diff --git a/src/components/Connection/SGEConnect/__snapshots__/StepIdentityAndPdl.spec.tsx.snap b/src/components/Connection/SGEConnect/__snapshots__/StepIdentityAndPdl.spec.tsx.snap index f03a152d9..05a688726 100644 --- a/src/components/Connection/SGEConnect/__snapshots__/StepIdentityAndPdl.spec.tsx.snap +++ b/src/components/Connection/SGEConnect/__snapshots__/StepIdentityAndPdl.spec.tsx.snap @@ -33,6 +33,7 @@ exports[`StepIdentityAndPdl component should be rendered correctly 1`] = ` > <input aria-invalid="false" + autocomplete="given-name" class="MuiInputBase-input MuiOutlinedInput-input" id="firstName" required="" @@ -77,6 +78,7 @@ exports[`StepIdentityAndPdl component should be rendered correctly 1`] = ` > <input aria-invalid="false" + autocomplete="family-name" class="MuiInputBase-input MuiOutlinedInput-input" id="lastName" required="" -- GitLab