From 032fa5738314093129a31233b69c96e5d5fa8da8 Mon Sep 17 00:00:00 2001 From: Agnieszka Gancarczyk Date: Fri, 9 Jul 2021 17:15:21 +0100 Subject: [PATCH] added accessibility fixes --- src/clients/ClientSettings.tsx | 12 ++++---- src/clients/add/CapabilityConfig.tsx | 30 ++++++++++++------- src/clients/add/GeneralSettings.tsx | 2 +- .../list-empty-state/ListEmptyState.tsx | 2 +- .../multi-line-input/MultiLineInput.tsx | 2 ++ src/components/scroll-form/ScrollPanel.tsx | 2 +- src/dashboard/Dashboard.tsx | 8 +++-- 7 files changed, 38 insertions(+), 20 deletions(-) diff --git a/src/clients/ClientSettings.tsx b/src/clients/ClientSettings.tsx index 7da0cb38a2..d0f43e695d 100644 --- a/src/clients/ClientSettings.tsx +++ b/src/clients/ClientSettings.tsx @@ -78,12 +78,13 @@ export const ClientSettings = ({ save, reset }: ClientSettingsProps) => { } > @@ -94,7 +95,7 @@ export const ClientSettings = ({ save, reset }: ClientSettingsProps) => { } > @@ -112,12 +113,13 @@ export const ClientSettings = ({ save, reset }: ClientSettingsProps) => { } > @@ -197,7 +199,7 @@ export const ClientSettings = ({ save, reset }: ClientSettingsProps) => { control={control} render={({ onChange, value }) => ( { control={control} render={({ onChange, value }) => ( } > @@ -60,7 +60,7 @@ export const CapabilityConfig = ({ render={({ onChange, value }) => ( } > @@ -95,7 +95,7 @@ export const CapabilityConfig = ({ render={({ onChange, value }) => ( )} @@ -159,7 +161,9 @@ export const CapabilityConfig = ({ )} @@ -183,7 +187,9 @@ export const CapabilityConfig = ({ )} @@ -213,7 +219,9 @@ export const CapabilityConfig = ({ )} @@ -232,7 +240,9 @@ export const CapabilityConfig = ({ } label={t("encryptAssertions")} @@ -260,7 +270,7 @@ export const CapabilityConfig = ({ } label={t("clientSignature")} diff --git a/src/clients/add/GeneralSettings.tsx b/src/clients/add/GeneralSettings.tsx index d2fcca0c66..913fd92d33 100644 --- a/src/clients/add/GeneralSettings.tsx +++ b/src/clients/add/GeneralSettings.tsx @@ -30,7 +30,7 @@ export const GeneralSettings = () => { } > diff --git a/src/components/list-empty-state/ListEmptyState.tsx b/src/components/list-empty-state/ListEmptyState.tsx index 40d60a5704..d13337813f 100644 --- a/src/components/list-empty-state/ListEmptyState.tsx +++ b/src/components/list-empty-state/ListEmptyState.tsx @@ -47,7 +47,7 @@ export const ListEmptyState = ({ ) : ( hasIcon && )} - + <Title headingLevel="h1" size="lg"> {message} {instructions} diff --git a/src/components/multi-line-input/MultiLineInput.tsx b/src/components/multi-line-input/MultiLineInput.tsx index af45798957..bfb81d9ce8 100644 --- a/src/components/multi-line-input/MultiLineInput.tsx +++ b/src/components/multi-line-input/MultiLineInput.tsx @@ -64,6 +64,7 @@ export const MultiLineInput = ({ variant={ButtonVariant.link} onClick={() => remove(index)} tabIndex={-1} + aria-label={t("common:remove")} isDisabled={index === fields.length - 1} > @@ -74,6 +75,7 @@ export const MultiLineInput = ({ variant={ButtonVariant.link} onClick={() => append({})} tabIndex={-1} + aria-label={t("common:add")} isDisabled={ rest.isDisabled || !(currentValues && currentValues[index]?.value) diff --git a/src/components/scroll-form/ScrollPanel.tsx b/src/components/scroll-form/ScrollPanel.tsx index 5bf141b4e6..81e26f3a35 100644 --- a/src/components/scroll-form/ScrollPanel.tsx +++ b/src/components/scroll-form/ScrollPanel.tsx @@ -14,7 +14,7 @@ export const ScrollPanel = (props: ScrollPanelProps) => { return (
{ <DescriptionListTerm> {t("enabledFeatures")}{" "} <HelpItem - forID="enabledFeatures" + forID={t(`common:helpLabel`, { + label: t("enabledFeatures"), + })} forLabel={t("enabledFeatures")} helpText="dashboard:infoEnabledFeatures" /> @@ -143,7 +145,9 @@ const Dashboard = () => { <DescriptionListTerm> {t("disabledFeatures")}{" "} <HelpItem - forID="disabledFeatures" + forID={t(`common:helpLabel`, { + label: t("disabledFeatures"), + })} forLabel={t("disabledFeatures")} helpText="dashboard:infoDisabledFeatures" />