Critical accessibility fixes for Users page (#2865)

This commit is contained in:
agagancarczyk 2022-06-27 09:45:15 +01:00 committed by GitHub
parent b74265c722
commit 6b257633e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 2 deletions

View file

@ -163,5 +163,6 @@
"credentialResetConfirm": "Send Email", "credentialResetConfirm": "Send Email",
"credentialResetConfirmText": "Are you sure you want to send email to user", "credentialResetConfirmText": "Are you sure you want to send email to user",
"credentialResetEmailSuccess": "Email sent to user.", "credentialResetEmailSuccess": "Email sent to user.",
"credentialResetEmailError": "Failed: {{error}}" "credentialResetEmailError": "Failed: {{error}}",
"editUserLabel": "Edit User Label Button"
} }

View file

@ -143,6 +143,7 @@ export const ResourcesPolicySelect = ({
aria-labelledby={t(name)} aria-labelledby={t(name)}
isDisabled={!!preSelected} isDisabled={!!preSelected}
validated={errors[name] ? "error" : "default"} validated={errors[name] ? "error" : "default"}
typeAheadAriaLabel={t(name)}
> >
{toSelectOptions()} {toSelectOptions()}
</Select> </Select>

View file

@ -95,6 +95,7 @@ export const ScopeSelect = ({
aria-labelledby={t("scopes")} aria-labelledby={t("scopes")}
validated={errors.scopes ? "error" : "default"} validated={errors.scopes ? "error" : "default"}
isDisabled={!!preSelected} isDisabled={!!preSelected}
typeAheadAriaLabel={t("scopes")}
> >
{toSelectOptions(scopes)} {toSelectOptions(scopes)}
</Select> </Select>

View file

@ -239,6 +239,7 @@ export const GroupPickerDialog = ({
<DataListCheck <DataListCheck
className="kc-join-group-modal-check" className="kc-join-group-modal-check"
data-testid={`${group.name}-check`} data-testid={`${group.name}-check`}
aria-label={group.name}
checked={group.checked} checked={group.checked}
isDisabled={isRowDisabled(group)} isDisabled={isRowDisabled(group)}
onChange={(checked) => { onChange={(checked) => {

View file

@ -167,6 +167,7 @@ export const UserForm = ({
<FormGroup label={t("common:id")} fieldId="kc-id" isRequired> <FormGroup label={t("common:id")} fieldId="kc-id" isRequired>
<KeycloakTextInput <KeycloakTextInput
id={user.id} id={user.id}
aria-label={t("userID")}
value={user.id} value={user.id}
type="text" type="text"
isReadOnly isReadOnly
@ -179,6 +180,7 @@ export const UserForm = ({
)} )}
type="text" type="text"
id="kc-created-at" id="kc-created-at"
aria-label={t("createdAt")}
name="createdTimestamp" name="createdTimestamp"
isReadOnly isReadOnly
/> />
@ -197,6 +199,7 @@ export const UserForm = ({
ref={register()} ref={register()}
type="text" type="text"
id="kc-username" id="kc-username"
aria-label={t("username")}
name="username" name="username"
isReadOnly={!!user?.id && !realm?.editUsernameAllowed} isReadOnly={!!user?.id && !realm?.editUsernameAllowed}
/> />
@ -258,6 +261,7 @@ export const UserForm = ({
data-testid="firstName-input" data-testid="firstName-input"
type="text" type="text"
id="kc-firstname" id="kc-firstname"
aria-label={t("firstName")}
name="firstName" name="firstName"
/> />
</FormGroup> </FormGroup>

View file

@ -53,7 +53,7 @@ export const CredentialsResetActionMultiSelect = () => {
event.stopPropagation(); event.stopPropagation();
onChange([]); onChange([]);
}} }}
aria-label={t("resetActions")} typeAheadAriaLabel={t("resetActions")}
> >
{Object.values(RequiredActionAlias).map((action, index) => ( {Object.values(RequiredActionAlias).map((action, index) => (
<SelectOption <SelectOption

View file

@ -88,6 +88,7 @@ export const InlineLabelEdit = ({
<> <>
{credential.userLabel} {credential.userLabel}
<Button <Button
aria-label={t("editUserLabel")}
variant="link" variant="link"
className="kc-editUserLabel-btn" className="kc-editUserLabel-btn"
onClick={toggle} onClick={toggle}