Skip to content

Commit 815e634

Browse files
authored
fix(accessibilite): modification des labels des champs recherches pour l'ouverture de lien externe (règle 7.4) (#6800)
1 parent ae3c3d2 commit 815e634

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

packages/code-du-travail-frontend/src/modules/home/Components/HomeSearch.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,14 @@ export const HomeSearch = () => {
7272
<div className={fr.cx("fr-col-12", "fr-col-md-8")}>
7373
<Autocomplete<string>
7474
hintText="par exemple : congés payés, durée de préavis"
75-
label={<>{label}</>}
75+
label={
76+
<>
77+
{label}{" "}
78+
<span className={fr.cx("fr-sr-only")}>
79+
, la sélection d&apos;une option charge une nouvelle page
80+
</span>
81+
</>
82+
}
7683
displayLabel={(item) => item ?? ""}
7784
onInputValueChange={(value) => {
7885
if (value) {

packages/code-du-travail-frontend/src/modules/layout/header/HeaderSearch.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ export const HeaderSearch = ({ onSearchSubmit }: HeaderSearchProps) => {
3838
}}
3939
>
4040
<Autocomplete<string>
41-
label="Rechercher sur le site"
41+
label={
42+
"Recherchez sur le site, la sélection d'une option charge une nouvelle page"
43+
}
4244
placeholder="Rechercher sur le site"
4345
isSearch
4446
displayLabel={(data) => data ?? ""}

0 commit comments

Comments
 (0)