From 5064a51dd86009a73fdef0d3af4360dbfff219f2 Mon Sep 17 00:00:00 2001 From: Johanna Date: Mon, 28 Aug 2023 15:13:21 -0400 Subject: [PATCH] Modified multiselect component so the required prop gets set as aria-required --- frontend/src/app/commonComponents/MultiSelect/MultiSelect.tsx | 1 + .../DeviceType/__snapshots__/DeviceForm.test.tsx.snap | 2 ++ .../__snapshots__/DeviceTypeFormContainer.test.tsx.snap | 2 ++ .../__snapshots__/ManageDeviceTypeFormContainer.test.tsx.snap | 2 ++ 4 files changed, 7 insertions(+) diff --git a/frontend/src/app/commonComponents/MultiSelect/MultiSelect.tsx b/frontend/src/app/commonComponents/MultiSelect/MultiSelect.tsx index f2abacf105..b584b532e4 100644 --- a/frontend/src/app/commonComponents/MultiSelect/MultiSelect.tsx +++ b/frontend/src/app/commonComponents/MultiSelect/MultiSelect.tsx @@ -191,6 +191,7 @@ export const MultiSelect = ({ className="multi-select-dropdown" disabled={isDisabled} placeholder={placeholder} + inputProps={{ "aria-required": required }} ariaInvalid={validationStatus === "error"} registrationProps={registrationProps} DropdownComponent={DropdownComponent} diff --git a/frontend/src/app/supportAdmin/DeviceType/__snapshots__/DeviceForm.test.tsx.snap b/frontend/src/app/supportAdmin/DeviceType/__snapshots__/DeviceForm.test.tsx.snap index 95c73f7ba9..6b7953743f 100644 --- a/frontend/src/app/supportAdmin/DeviceType/__snapshots__/DeviceForm.test.tsx.snap +++ b/frontend/src/app/supportAdmin/DeviceType/__snapshots__/DeviceForm.test.tsx.snap @@ -457,6 +457,7 @@ Object { aria-invalid="false" aria-labelledby="label-for-45" aria-owns="multi-select-swabTypes-list" + aria-required="true" autocapitalize="off" autocomplete="off" class="usa-combo-box__input" @@ -1222,6 +1223,7 @@ Object { aria-invalid="false" aria-labelledby="label-for-45" aria-owns="multi-select-swabTypes-list" + aria-required="true" autocapitalize="off" autocomplete="off" class="usa-combo-box__input" diff --git a/frontend/src/app/supportAdmin/DeviceType/__snapshots__/DeviceTypeFormContainer.test.tsx.snap b/frontend/src/app/supportAdmin/DeviceType/__snapshots__/DeviceTypeFormContainer.test.tsx.snap index 5dacd88b87..4be637be04 100644 --- a/frontend/src/app/supportAdmin/DeviceType/__snapshots__/DeviceTypeFormContainer.test.tsx.snap +++ b/frontend/src/app/supportAdmin/DeviceType/__snapshots__/DeviceTypeFormContainer.test.tsx.snap @@ -253,6 +253,7 @@ Object { aria-invalid="false" aria-labelledby="label-for-5" aria-owns="multi-select-swabTypes-list" + aria-required="true" autocapitalize="off" autocomplete="off" class="usa-combo-box__input" @@ -771,6 +772,7 @@ Object { aria-invalid="false" aria-labelledby="label-for-5" aria-owns="multi-select-swabTypes-list" + aria-required="true" autocapitalize="off" autocomplete="off" class="usa-combo-box__input" diff --git a/frontend/src/app/supportAdmin/DeviceType/__snapshots__/ManageDeviceTypeFormContainer.test.tsx.snap b/frontend/src/app/supportAdmin/DeviceType/__snapshots__/ManageDeviceTypeFormContainer.test.tsx.snap index 5fc3942b92..a37f09eb01 100644 --- a/frontend/src/app/supportAdmin/DeviceType/__snapshots__/ManageDeviceTypeFormContainer.test.tsx.snap +++ b/frontend/src/app/supportAdmin/DeviceType/__snapshots__/ManageDeviceTypeFormContainer.test.tsx.snap @@ -419,6 +419,7 @@ Object { aria-invalid="false" aria-labelledby="label-for-5" aria-owns="multi-select-swabTypes-list" + aria-required="true" autocapitalize="off" autocomplete="off" class="usa-combo-box__input" @@ -1143,6 +1144,7 @@ Object { aria-invalid="false" aria-labelledby="label-for-5" aria-owns="multi-select-swabTypes-list" + aria-required="true" autocapitalize="off" autocomplete="off" class="usa-combo-box__input"