multiple: fix selectable card actions
The Card component needs an aria-label when the card is selectable. Since this was not set, a warning error was polluting the test output. Fixes #3319
This commit is contained in:
parent
16e5bdbe3a
commit
bac647ded6
2 changed files with 17 additions and 2 deletions
|
|
@ -42,7 +42,15 @@ const BlueprintCard = ({ blueprint }: blueprintProps) => {
|
|||
isClickable
|
||||
onClick={() => dispatch(setBlueprintId(blueprint.id))}
|
||||
>
|
||||
<CardHeader data-testid={blueprint.id}>
|
||||
<CardHeader
|
||||
data-testid={blueprint.id}
|
||||
selectableActions={{
|
||||
name: blueprint.id,
|
||||
selectableActionId: blueprint.id,
|
||||
selectableActionAriaLabel: blueprint.id,
|
||||
isHidden: true, // hide the card's checkbox
|
||||
}}
|
||||
>
|
||||
<CardTitle>
|
||||
{isLoading && blueprint.id === selectedBlueprintId && (
|
||||
<Spinner size="md" />
|
||||
|
|
|
|||
|
|
@ -66,7 +66,14 @@ const TargetEnvironmentCard = ({
|
|||
isSelectable
|
||||
isLarge
|
||||
>
|
||||
<CardHeader>
|
||||
<CardHeader
|
||||
selectableActions={{
|
||||
name: title,
|
||||
selectableActionId: title.toLowerCase(),
|
||||
selectableActionAriaLabel: title.toLowerCase(),
|
||||
isHidden: true, // hide the card's checkbox
|
||||
}}
|
||||
>
|
||||
<Flex direction={{ default: 'column' }}>
|
||||
<FlexItem>
|
||||
<img className="provider-icon" src={imageSrc} alt={imageAlt} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue