Critical accessibility fixes for User federation page - Issue #2848 (#2867)

* added form labels

* fixed labels

* fix

Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
This commit is contained in:
agagancarczyk 2022-06-23 11:50:24 +01:00 committed by GitHub
parent 2ce59b6f7c
commit 4ec40a52a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View file

@ -164,5 +164,10 @@
"userModelAttributeName": "User model attribute name", "userModelAttributeName": "User model attribute name",
"attributeValue": "Attribute value", "attributeValue": "Attribute value",
"selectRole": "Select role", "selectRole": "Select role",
"group": "Group" "group": "Group",
"providerId": "Provider ID",
"providerType": "Provider Type",
"parentId": "Parent ID",
"kerberosPrincipal": "Kerberos Principal",
"kerberosKeyTab": "Kerberos Key Tab"
} }

View file

@ -113,7 +113,7 @@ export const ManagePriorityDialog = ({
{sortBy(components, "config.priority").map((component) => ( {sortBy(components, "config.priority").map((component) => (
<DataListItem <DataListItem
aria-labelledby={component.name} aria-labelledby={component.name}
id={component.name} id={`${component.name}-item`}
key={component.name} key={component.name}
> >
<DataListItemRow> <DataListItemRow>

View file

@ -81,6 +81,7 @@ export const KerberosSettingsRequired = ({
name="providerId" name="providerId"
defaultValue="kerberos" defaultValue="kerberos"
ref={form.register} ref={form.register}
aria-label={t("providerId")}
/> />
<KeycloakTextInput <KeycloakTextInput
hidden hidden
@ -89,6 +90,7 @@ export const KerberosSettingsRequired = ({
name="providerType" name="providerType"
defaultValue="org.keycloak.storage.UserStorageProvider" defaultValue="org.keycloak.storage.UserStorageProvider"
ref={form.register} ref={form.register}
aria-label={t("providerType")}
/> />
<KeycloakTextInput <KeycloakTextInput
hidden hidden
@ -97,6 +99,7 @@ export const KerberosSettingsRequired = ({
name="parentId" name="parentId"
defaultValue={realm} defaultValue={realm}
ref={form.register} ref={form.register}
aria-label={t("parentId")}
/> />
<KeycloakTextInput <KeycloakTextInput
@ -112,6 +115,7 @@ export const KerberosSettingsRequired = ({
})} })}
data-testid="kerberos-name" data-testid="kerberos-name"
validated={form.errors.name ? "error" : "default"} validated={form.errors.name ? "error" : "default"}
aria-label={t("consoleDisplayName")}
/> />
</FormGroup> </FormGroup>
@ -142,6 +146,7 @@ export const KerberosSettingsRequired = ({
}, },
})} })}
data-testid="kerberos-realm" data-testid="kerberos-realm"
aria-label={t("kerberosRealm")}
validated={ validated={
form.errors.config?.kerberosRealm?.[0] ? "error" : "default" form.errors.config?.kerberosRealm?.[0] ? "error" : "default"
} }
@ -175,6 +180,7 @@ export const KerberosSettingsRequired = ({
}, },
})} })}
data-testid="kerberos-principal" data-testid="kerberos-principal"
aria-label={t("kerberosPrincipal")}
validated={ validated={
form.errors.config?.serverPrincipal?.[0] ? "error" : "default" form.errors.config?.serverPrincipal?.[0] ? "error" : "default"
} }
@ -206,6 +212,7 @@ export const KerberosSettingsRequired = ({
}, },
})} })}
data-testid="kerberos-keytab" data-testid="kerberos-keytab"
aria-label={t("kerberosKeyTab")}
validated={form.errors.config?.keyTab?.[0] ? "error" : "default"} validated={form.errors.config?.keyTab?.[0] ? "error" : "default"}
/> />
</FormGroup> </FormGroup>