Make sure cards are clickable by screen readers (#2965)

This commit is contained in:
Erik Jan de Wit 2022-07-27 17:17:44 +02:00 committed by GitHub
parent b6b1e5212c
commit 410a320381
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -53,7 +53,7 @@ export const KeycloakCard = ({
}; };
return ( return (
<Card isSelectable onClick={openSettings}> <Card role="button" isSelectable onClick={openSettings}>
<CardHeader> <CardHeader>
<CardActions> <CardActions>
{dropdownItems && ( {dropdownItems && (

View file

@ -191,6 +191,7 @@ export default function IdentityProvidersSection() {
{sortBy(identityProviders[group], "name").map((provider) => ( {sortBy(identityProviders[group], "name").map((provider) => (
<Card <Card
className="keycloak-empty-state-card" className="keycloak-empty-state-card"
role="button"
key={provider.id} key={provider.id}
isHoverable isHoverable
data-testid={`${provider.id}-card`} data-testid={`${provider.id}-card`}

View file

@ -197,6 +197,7 @@ export default function UserFederationSection() {
<Card <Card
key={p.id} key={p.id}
className="keycloak-empty-state-card" className="keycloak-empty-state-card"
role="button"
isHoverable isHoverable
onClick={() => onClick={() =>
history.push(toProvider({ realm, providerId: p.id! })) history.push(toProvider({ realm, providerId: p.id! }))