From c0788fbe336741cedbea18807203c14f5daa9162 Mon Sep 17 00:00:00 2001 From: Ali Amori Kadhim Date: Tue, 12 Sep 2023 11:01:17 +0200 Subject: [PATCH] feat(pdc-frontend): add `id` prop to `SearchBar` --- apps/pdc-frontend/src/components/SearchBar/index.tsx | 1 + apps/pdc-frontend/src/components/UtrechtSearchBar/index.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/pdc-frontend/src/components/SearchBar/index.tsx b/apps/pdc-frontend/src/components/SearchBar/index.tsx index 38ef4565..80f121e8 100644 --- a/apps/pdc-frontend/src/components/SearchBar/index.tsx +++ b/apps/pdc-frontend/src/components/SearchBar/index.tsx @@ -88,6 +88,7 @@ export const SearchBar: React.FC = ({ onChange={onChange} items={optimisticSearchValue.value} input={{ + id: 'search-input', ariaLabel: inputAriaLabel, name: 'search', required: true, diff --git a/apps/pdc-frontend/src/components/UtrechtSearchBar/index.tsx b/apps/pdc-frontend/src/components/UtrechtSearchBar/index.tsx index a9695a9b..b47133bb 100644 --- a/apps/pdc-frontend/src/components/UtrechtSearchBar/index.tsx +++ b/apps/pdc-frontend/src/components/UtrechtSearchBar/index.tsx @@ -10,6 +10,7 @@ type InputTypes = { ariaLabel?: string; required?: boolean; spellCheck?: boolean; + id?: string; }; type ButtonTypes = { @@ -128,6 +129,7 @@ export const UtrechtSearchBar: React.FC = ({ {...getInputProps()} placeholder={input?.placeholder} required={input?.required} + id={input?.id} name={input?.name} type="search" aria-label={input?.ariaLabel}