From 73e5c8290f73ce747a3c108cb03ed3e408491f2e Mon Sep 17 00:00:00 2001 From: agagancarczyk <4890675+agagancarczyk@users.noreply.github.com> Date: Tue, 23 Jan 2024 09:28:50 +0000 Subject: [PATCH] Fixed a11y violations and typos in translations for messages in the dialog message for disabling clients. (#26395) * fixed critical violations Signed-off-by: Agnieszka Gancarczyk * fixed more a11y violations Signed-off-by: Agnieszka Gancarczyk * renamed translation Signed-off-by: Agnieszka Gancarczyk * added area-label Signed-off-by: Agnieszka Gancarczyk * added area-label Signed-off-by: Agnieszka Gancarczyk * renamed spinners translation Signed-off-by: Agnieszka Gancarczyk --------- Signed-off-by: Agnieszka Gancarczyk Co-authored-by: Agnieszka Gancarczyk --- .../admin/messages/messages_en.properties | 10 +++++++--- .../authentication/components/DraggableTable.tsx | 6 +++--- .../admin-ui/src/clients/keys/SamlKeysDialog.tsx | 2 +- .../src/clients/scopes/GeneratedCodeTab.tsx | 7 ++++++- .../keycloak-spinner/KeycloakSpinner.tsx | 15 ++++++++++----- .../ldap/LdapSettingsConnection.tsx | 1 + .../user-federation/ldap/LdapSettingsGeneral.tsx | 1 + 7 files changed, 29 insertions(+), 13 deletions(-) diff --git a/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties b/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties index 7de216f418..b0184da65c 100644 --- a/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties +++ b/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties @@ -893,8 +893,8 @@ eventTypes.FEDERATED_IDENTITY_LINK_ERROR.name=Federated identity link error eventTypes.EXECUTE_ACTIONS.name=Execute actions encryptAssertions=Encrypt assertions disableConfirmTitle=Disable realm? -disableConfirmTitleClient=Disable client? -dirableConfirmClient=Are you sure you want to disable this client? +disableConfirmTitleClientTitle=Disable client? +disableConfirmClient=Are you sure you want to disable this client? custom=Custom Attribute... keyTab=Key tab addSamlProvider=Add SAML provider @@ -3043,4 +3043,8 @@ chooseBindingType=Choose binding type selectFlowType=Select flow type selectClientAssertionSigningAlg=Select client assertion signing algorithm resourceDetailsTypeHelp=The type of this resource. It can be used to group different resource instances with the same type. -searchForClientPolicy=Search for client policy \ No newline at end of file +searchForClientPolicy=Search for client policy +selectVendor=Select vendor +spinnerLoading=Loading +enableClientSignatureRequiredModal=Enable client signature required +selectBindType=Select bind type \ No newline at end of file diff --git a/js/apps/admin-ui/src/authentication/components/DraggableTable.tsx b/js/apps/admin-ui/src/authentication/components/DraggableTable.tsx index 04b8d26d85..2328394730 100644 --- a/js/apps/admin-ui/src/authentication/components/DraggableTable.tsx +++ b/js/apps/admin-ui/src/authentication/components/DraggableTable.tsx @@ -67,7 +67,7 @@ export function DraggableTable({ const draggedItemId = evt.currentTarget.id; evt.currentTarget.classList.add(styles.modifiers.ghostRow); - evt.currentTarget.setAttribute("aria-pressed", "true"); + evt.currentTarget.setAttribute("aria-grabbed", "true"); setState({ ...state, draggedItemId, dragging: true }); }; @@ -101,7 +101,7 @@ export function DraggableTable({ const onDragCancel = () => { Array.from(bodyRef.current?.children || []).forEach((el) => { el.classList.remove(styles.modifiers.ghostRow); - el.setAttribute("aria-pressed", "false"); + el.setAttribute("aria-grabbed", "false"); }); setState({ ...state, @@ -172,7 +172,7 @@ export function DraggableTable({ const onDragEnd = (evt: ReactDragEvent) => { const tr = evt.target as HTMLTableRowElement; tr.classList.remove(styles.modifiers.ghostRow); - tr.setAttribute("aria-pressed", "false"); + tr.setAttribute("aria-grabbed", "false"); setState({ ...state, draggedItemId: "", diff --git a/js/apps/admin-ui/src/clients/keys/SamlKeysDialog.tsx b/js/apps/admin-ui/src/clients/keys/SamlKeysDialog.tsx index d4e4ad9841..382a2fddf0 100644 --- a/js/apps/admin-ui/src/clients/keys/SamlKeysDialog.tsx +++ b/js/apps/admin-ui/src/clients/keys/SamlKeysDialog.tsx @@ -114,7 +114,7 @@ export const SamlKeysDialog = ({ return ( {t("enableClientSignatureRequired")} diff --git a/js/apps/admin-ui/src/clients/scopes/GeneratedCodeTab.tsx b/js/apps/admin-ui/src/clients/scopes/GeneratedCodeTab.tsx index 955f770ff9..161a3a3e95 100644 --- a/js/apps/admin-ui/src/clients/scopes/GeneratedCodeTab.tsx +++ b/js/apps/admin-ui/src/clients/scopes/GeneratedCodeTab.tsx @@ -33,7 +33,12 @@ export const GeneratedCodeTab = ({ } > - + ) : ( diff --git a/js/apps/admin-ui/src/components/keycloak-spinner/KeycloakSpinner.tsx b/js/apps/admin-ui/src/components/keycloak-spinner/KeycloakSpinner.tsx index a0516db60b..92fcf651cc 100644 --- a/js/apps/admin-ui/src/components/keycloak-spinner/KeycloakSpinner.tsx +++ b/js/apps/admin-ui/src/components/keycloak-spinner/KeycloakSpinner.tsx @@ -1,7 +1,12 @@ import { Bullseye, Spinner } from "@patternfly/react-core"; +import { useTranslation } from "react-i18next"; -export const KeycloakSpinner = () => ( - - - -); +export const KeycloakSpinner = () => { + const { t } = useTranslation(); + + return ( + + + + ); +}; diff --git a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsConnection.tsx b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsConnection.tsx index fa1855739a..c470edf58f 100644 --- a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsConnection.tsx +++ b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsConnection.tsx @@ -282,6 +282,7 @@ export const LdapSettingsConnection = ({ selections={field.value} variant={SelectVariant.single} data-testid="ldap-bind-type" + aria-label={t("selectBindType")} > diff --git a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsGeneral.tsx b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsGeneral.tsx index ece7ed9233..32e0f537a3 100644 --- a/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsGeneral.tsx +++ b/js/apps/admin-ui/src/user-federation/ldap/LdapSettingsGeneral.tsx @@ -179,6 +179,7 @@ export const LdapSettingsGeneral = ({ }} selections={field.value} variant={SelectVariant.single} + aria-label={t("selectVendor")} > Active Directory