Skip to content

Commit 6910034

Browse files
authored
feat: add an id to the label (#366)
1 parent 1f54b1f commit 6910034

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Header/Header.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ export const Header = memo(
148148
const menuButtonId = `${id}-menu-button`;
149149
const searchModalId = `${id}-search-modal`;
150150
const searchInputId = `${id}-search-input`;
151+
const searchLabelId = `${id}-search-label`;
151152

152153
const isSearchBarEnabled =
153154
renderSearchInput !== undefined || onSearchButtonClick !== undefined;
@@ -393,6 +394,7 @@ export const Header = memo(
393394
<label
394395
className={fr.cx("fr-label")}
395396
htmlFor={searchInputId}
397+
id={searchLabelId}
396398
>
397399
{tSearchBar("label")}
398400
</label>

0 commit comments

Comments
 (0)