added aria-labels required by screen recorder (#3234)

Authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
This commit is contained in:
agagancarczyk 2022-08-30 14:07:51 +01:00 committed by GitHub
parent ea5a41f572
commit d81164e371
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 87 additions and 4 deletions

View file

@ -52,6 +52,7 @@
"helpDisabled": "Help off",
"documentation": "Documentation",
"enableHelpMode": "Enable help mode",
"enableHelp": "Help is enabled",
"learnMore": "Learn more",
"show": "Show",
"hide": "Hide",

View file

@ -145,6 +145,7 @@ export const RequiredActions = () => {
onChange={() => {
updateAction(row.data, "enabled");
}}
aria-label={toKey(row.name)}
/>
),
},
@ -161,6 +162,7 @@ export const RequiredActions = () => {
onChange={() => {
updateAction(row.data, "defaultAction");
}}
aria-label={toKey(row.name)}
/>
),
},

View file

@ -96,6 +96,7 @@ export const PolicyRow = ({
labelOff={t("common:off")}
isChecked
isDisabled
aria-label={displayName}
/>
)}
</SplitItem>

View file

@ -332,6 +332,7 @@ export const WebauthnPolicy = ({
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("webAuthnPolicyAvoidSameAuthenticatorRegister")}
/>
)}
/>

View file

@ -223,6 +223,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => {
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange("" + value)}
aria-label={t("displayOnConsentScreen")}
/>
)}
/>
@ -268,6 +269,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => {
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange("" + value)}
aria-label={t("includeInTokenScope")}
/>
)}
/>

View file

@ -92,7 +92,7 @@ export const ClientDescription = ({
/>
</FormGroup>
<FormGroup
label={t("clients:alwaysDisplayInConsole")}
label={t("alwaysDisplayInConsole")}
labelIcon={
<HelpItem
helpText="clients-help:alwaysDisplayInConsole"
@ -113,6 +113,7 @@ export const ClientDescription = ({
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("alwaysDisplayInConsole")}
/>
)}
/>

View file

@ -77,6 +77,7 @@ export const CapabilityConfig = ({
);
}
}}
aria-label={t("clientAuthentication")}
/>
)}
/>
@ -111,6 +112,7 @@ export const CapabilityConfig = ({
}
}}
isDisabled={clientAuthentication}
aria-label={t("clientAuthorization")}
/>
)}
/>
@ -300,6 +302,7 @@ export const CapabilityConfig = ({
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("encryptAssertions")}
/>
)}
/>
@ -329,6 +332,7 @@ export const CapabilityConfig = ({
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("clientSignature")}
/>
)}
/>

View file

@ -94,6 +94,7 @@ export const LoginSettingsPanel = ({ access }: { access?: boolean }) => {
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("consentRequired")}
/>
)}
/>
@ -123,6 +124,7 @@ export const LoginSettingsPanel = ({ access }: { access?: boolean }) => {
isChecked={value === "true"}
onChange={(value) => onChange("" + value)}
isDisabled={!consentRequired}
aria-label={t("displayOnClient")}
/>
)}
/>

View file

@ -59,6 +59,7 @@ export const LogoutPanel = ({
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("frontchannelLogout")}
/>
)}
/>
@ -167,6 +168,7 @@ export const LogoutPanel = ({
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("backchannelLogoutSessionRequired")}
/>
)}
/>
@ -195,6 +197,7 @@ export const LogoutPanel = ({
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("backchannelLogoutRevokeOfflineSessions")}
/>
)}
/>

View file

@ -42,6 +42,7 @@ export const Toggle = ({ name, label }: { name: string; label: string }) => {
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t(label)}
/>
)}
/>

View file

@ -103,6 +103,7 @@ export const AdvancedSettings = ({
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange("" + value)}
aria-label={t("oAuthMutual")}
/>
)}
/>
@ -168,6 +169,7 @@ export const AdvancedSettings = ({
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("pushedAuthorizationRequestRequired")}
/>
)}
/>

View file

@ -50,6 +50,7 @@ export const OpenIdConnectCompatibilityModes = ({
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("excludeSessionStateFromAuthenticationResponse")}
/>
)}
/>
@ -76,6 +77,7 @@ export const OpenIdConnectCompatibilityModes = ({
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("useRefreshTokens")}
/>
)}
/>
@ -104,6 +106,7 @@ export const OpenIdConnectCompatibilityModes = ({
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("useRefreshTokenForClientCredentialsGrant")}
/>
)}
/>
@ -132,6 +135,7 @@ export const OpenIdConnectCompatibilityModes = ({
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("useLowerCaseBearerType")}
/>
)}
/>

View file

@ -269,6 +269,7 @@ export const AuthorizationEvaluate = ({ client }: Props) => {
labelOff={t("common:off")}
isChecked={applyToResourceType}
onChange={setApplyToResourceType}
aria-label={t("applyToResourceType")}
/>
</FormGroup>

View file

@ -122,6 +122,7 @@ export const ImportDialog = ({ onConfirm, closeDialog }: ImportDialogProps) => {
labelOff={t("common:off")}
isChecked={imported.allowRemoteResourceManagement}
isDisabled
aria-label={t("allowRemoteResourceManagement")}
/>
</FormGroup>
</Form>

View file

@ -260,6 +260,7 @@ export default function PermissionDetails() {
labelOff={t("common:off")}
isChecked={applyToResourceTypeFlag}
onChange={setApplyToResourceTypeFlag}
aria-label={t("applyToResourceTypeFlag")}
/>
</FormGroup>
{applyToResourceTypeFlag ? (

View file

@ -296,6 +296,7 @@ export default function ResourceDetails() {
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("ownerManagedAccess")}
/>
)}
/>

View file

@ -158,6 +158,7 @@ export const AuthorizationSettings = ({ clientId }: { clientId: string }) => {
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("allowRemoteResourceManagement")}
/>
)}
/>

View file

@ -38,6 +38,7 @@ export const X509 = () => {
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("allowRegexComparison")}
/>
)}
/>

View file

@ -155,6 +155,7 @@ export const Keys = ({ clientId, save, hasConfigureAccess }: KeysProps) => {
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(`${value}`)}
aria-label={t("useJwksUrl")}
/>
)}
/>

View file

@ -110,6 +110,7 @@ const KeySection = ({
onGenerate(attr, false);
}
}}
aria-label={t(key)}
/>
)}
/>

View file

@ -100,6 +100,7 @@ export const DedicatedScope = ({
labelOff={t("common:off")}
isChecked={client.fullScopeAllowed}
onChange={update}
aria-label={t("fullScopeAllowed")}
/>
</FormGroup>
</FormAccess>

View file

@ -39,6 +39,7 @@ export const BooleanComponent = ({
isChecked={value === "true" || value === true}
onChange={(value) => onChange("" + value)}
data-testid={name}
aria-label={t(label!)}
/>
)}
/>

View file

@ -69,7 +69,7 @@ export const HelpHeader = () => {
<SplitItem>
<Switch
id="enableHelp"
aria-label="Help is enabled"
aria-label={t("common:enableHelp")}
isChecked={help.enabled}
label=""
className="keycloak_help-header-switch"

View file

@ -157,6 +157,7 @@ export const PermissionsTab = ({ id, type }: PermissionsTabProps) => {
toggleDisableDialog();
}
}}
aria-label={t("permissionsEnabled")}
/>
</FormGroup>
</Form>

View file

@ -130,6 +130,7 @@ export const ViewHeader = ({
className="pf-u-mr-lg"
isDisabled={isReadOnly}
isChecked={isEnabled}
aria-label={t("common:enabled")}
onChange={(value) => {
onToggle(value);
}}

View file

@ -93,6 +93,9 @@ export const DiscoveryEndpointField = ({
clearErrors("discoveryError");
setDiscovery(checked);
}}
aria-label={t(
id === "oidc" ? "useDiscoveryEndpoint" : "useEntityDescriptor"
)}
/>
</FormGroup>
{discovery && (

View file

@ -133,6 +133,7 @@ const GoogleFields = () => {
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("google.userIp")}
/>
)}
/>
@ -158,6 +159,7 @@ const GoogleFields = () => {
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("google.offlineAccess")}
/>
)}
/>
@ -227,6 +229,7 @@ const PaypalFields = () => {
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("paypal.sandbox")}
/>
)}
/>

View file

@ -36,6 +36,7 @@ export const SwitchField = ({
onChange(fieldType === "string" ? "" + value : value)
}
isDisabled={isReadOnly}
aria-label={label}
/>
)}
/>

View file

@ -335,6 +335,7 @@ export const RealmSettingsEmailTab = ({
onChange={(value) => {
onChange("" + value);
}}
aria-label={t("authentication")}
/>
)}
/>

View file

@ -200,6 +200,7 @@ export const RealmSettingsGeneralTab = ({
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("userManagedAccess")}
/>
)}
/>
@ -228,6 +229,7 @@ export const RealmSettingsGeneralTab = ({
labelOff={t("common:off")}
isChecked={value === "true"}
onChange={(value) => onChange(value.toString())}
aria-label={t("userProfileEnabled")}
/>
)}
/>

View file

@ -371,6 +371,7 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => {
: "internationalization-disabled"
}
onChange={onChange}
aria-label={t("internationalization")}
/>
)}
/>

View file

@ -74,6 +74,7 @@ export const RealmSettingsLoginTab = ({
onChange={(value) => {
updateSwitchValue({ registrationAllowed: value });
}}
aria-label={t("registrationAllowed")}
/>
</FormGroup>
<FormGroup
@ -98,6 +99,7 @@ export const RealmSettingsLoginTab = ({
onChange={(value) => {
updateSwitchValue({ resetPasswordAllowed: value });
}}
aria-label={t("resetPasswordAllowed")}
/>
</FormGroup>
<FormGroup
@ -121,6 +123,7 @@ export const RealmSettingsLoginTab = ({
onChange={(value) => {
updateSwitchValue({ rememberMe: value });
}}
aria-label={t("rememberMe")}
/>
</FormGroup>
</FormAccess>
@ -155,6 +158,7 @@ export const RealmSettingsLoginTab = ({
},
]);
}}
aria-label={t("registrationEmailAsUsername")}
/>
</FormGroup>
<FormGroup
@ -183,6 +187,7 @@ export const RealmSettingsLoginTab = ({
{ duplicateEmailsAllowed: false },
]);
}}
aria-label={t("loginWithEmailAllowed")}
/>
</FormGroup>
<FormGroup
@ -214,6 +219,7 @@ export const RealmSettingsLoginTab = ({
isDisabled={
realm.loginWithEmailAllowed || realm.registrationEmailAsUsername
}
aria-label={t("duplicateEmailsAllowed")}
/>
</FormGroup>
<FormGroup
@ -238,6 +244,7 @@ export const RealmSettingsLoginTab = ({
onChange={(value) => {
updateSwitchValue({ verifyEmail: value });
}}
aria-label={t("verifyEmail")}
/>
</FormGroup>
</FormAccess>
@ -268,6 +275,7 @@ export const RealmSettingsLoginTab = ({
onChange={(value) => {
updateSwitchValue({ editUsernameAllowed: value });
}}
aria-label={t("editUsernameAllowed")}
/>
</FormGroup>
</FormAccess>

View file

@ -111,6 +111,7 @@ export const PartialExportDialog = ({
onChange={setExportGroupsAndRoles}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("includeGroupsAndRoles")}
/>
</FormGroup>
<FormGroup
@ -125,6 +126,7 @@ export const PartialExportDialog = ({
isChecked={exportClients}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("includeClients")}
/>
</FormGroup>
</Form>

View file

@ -132,6 +132,7 @@ export const PoliciesTab = () => {
saveStatus();
}
}}
aria-label={clientPolicy.name!}
/>
)}
/>

View file

@ -286,7 +286,7 @@ export const RealmSettingsSessionsTab = ({
<Switch
id="kc-offline-session-max"
data-testid="offline-session-max-switch"
aria-label="offline-session-max-switch"
aria-label={t("offlineSessionMaxLimited")}
label={t("common:enabled")}
labelOff={t("common:disabled")}
isChecked={value}

View file

@ -169,7 +169,7 @@ export const RealmSettingsTokensTab = ({
<Switch
id="kc-revoke-refresh-token"
data-testid="revoke-refresh-token-switch"
aria-label="revoke-refresh-token-switch"
aria-label={t("revokeRefreshToken")}
label={t("common:enabled")}
labelOff={t("common:disabled")}
isChecked={value}

View file

@ -77,6 +77,7 @@ export const EventConfigForm = ({
onChange(value);
}
}}
aria-label={t("saveEvents")}
/>
)}
/>
@ -107,6 +108,7 @@ export const EventConfigForm = ({
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("includeRepresentation")}
/>
)}
/>

View file

@ -69,6 +69,7 @@ export const BruteForceDetection = ({
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("common:enabled")}
/>
)}
/>
@ -120,6 +121,7 @@ export const BruteForceDetection = ({
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("permanentLockout")}
/>
)}
/>

View file

@ -260,6 +260,7 @@ export const AttributeGeneralSettings = () => {
isChecked={value}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("required")}
/>
)}
/>

View file

@ -105,6 +105,7 @@ export default function NewRealmForm() {
labelOff={t("common:off")}
isChecked={value}
onChange={onChange}
aria-label={t("enabled")}
/>
)}
/>

View file

@ -241,6 +241,7 @@ export const KerberosSettingsRequired = ({
isChecked={value?.[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("debug")}
/>
)}
/>
@ -269,6 +270,7 @@ export const KerberosSettingsRequired = ({
isChecked={value?.[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("allowPasswordAuthentication")}
/>
)}
/>
@ -338,6 +340,7 @@ export const KerberosSettingsRequired = ({
isChecked={value?.[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("updateFirstLogin")}
/>
)}
/>

View file

@ -87,6 +87,7 @@ export const LdapSettingsAdvanced = ({
isChecked={value[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("enableLdapv3Password")}
/>
)}
></Controller>
@ -116,6 +117,7 @@ export const LdapSettingsAdvanced = ({
isChecked={value[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("validatePasswordPolicy")}
/>
)}
></Controller>
@ -145,6 +147,7 @@ export const LdapSettingsAdvanced = ({
isChecked={value[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("trustEmail")}
/>
)}
></Controller>

View file

@ -159,6 +159,7 @@ export const LdapSettingsConnection = ({
isChecked={value[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("enableStartTls")}
/>
)}
></Controller>
@ -222,6 +223,7 @@ export const LdapSettingsConnection = ({
isChecked={value[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("connectionPooling")}
/>
)}
></Controller>

View file

@ -62,6 +62,7 @@ export const LdapSettingsKerberosIntegration = ({
isChecked={value[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("allowKerberosAuthentication")}
/>
)}
></Controller>
@ -193,6 +194,7 @@ export const LdapSettingsKerberosIntegration = ({
isChecked={value[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("debug")}
/>
)}
></Controller>
@ -223,6 +225,7 @@ export const LdapSettingsKerberosIntegration = ({
isChecked={value[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("useKerberosForPasswordAuthentication")}
/>
)}
></Controller>

View file

@ -372,6 +372,7 @@ export const LdapSettingsSearching = ({
isChecked={value[0] === "true"}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("pagination")}
/>
)}
></Controller>

View file

@ -59,6 +59,7 @@ export const LdapSettingsSynchronization = ({
onChange={(value) => onChange([`${value}`])}
isChecked={value[0] === "true"}
isDisabled={false}
aria-label={t("importUsers")}
/>
)}
></Controller>
@ -107,6 +108,7 @@ export const LdapSettingsSynchronization = ({
label={t("common:on")}
labelOff={t("common:off")}
ref={form.register}
aria-label={t("periodicFullSync")}
/>
)}
></Controller>
@ -159,6 +161,7 @@ export const LdapSettingsSynchronization = ({
label={t("common:on")}
labelOff={t("common:off")}
ref={form.register}
aria-label={t("periodicChangedUsersSync")}
/>
)}
></Controller>

View file

@ -249,6 +249,7 @@ export const UserForm = ({
isChecked={value}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("emailVerified")}
/>
)}
/>
@ -304,6 +305,7 @@ export const UserForm = ({
isDisabled={!locked}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("temporaryLocked")}
/>
</FormGroup>
)}
@ -326,6 +328,7 @@ export const UserForm = ({
isChecked={value}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("common:enabled")}
/>
)}
/>

View file

@ -209,6 +209,7 @@ export const ResetPasswordDialog = ({
isChecked={value}
label={t("common:on")}
labelOff={t("common:off")}
aria-label={t("common:temporaryPassword")}
/>
)}
/>