From 53ca163c60e2124d0ef8369d029749613f23b209 Mon Sep 17 00:00:00 2001 From: sdrozdsap <163305268+sdrozdsap@users.noreply.github.com> Date: Thu, 30 Jan 2025 16:46:49 +0100 Subject: [PATCH] fix: use role group on shipping address cards (#19953) --- .../checkout-delivery-address.component.html | 1 + .../checkout-delivery-address.component.html | 1 + .../storefrontlib/shared/components/card/card.component.html | 1 + .../storefrontlib/shared/components/card/card.component.ts | 3 +++ 4 files changed, 6 insertions(+) diff --git a/feature-libs/checkout/b2b/components/checkout-delivery-address/checkout-delivery-address.component.html b/feature-libs/checkout/b2b/components/checkout-delivery-address/checkout-delivery-address.component.html index f72701b8ad8..74f93befe3c 100644 --- a/feature-libs/checkout/b2b/components/checkout-delivery-address/checkout-delivery-address.component.html +++ b/feature-libs/checkout/b2b/components/checkout-delivery-address/checkout-delivery-address.component.html @@ -48,6 +48,7 @@

[fitToContainer]="true" [content]="card.card" (sendCard)="selectAddress(card.address)" + [role]="'group'" > diff --git a/feature-libs/checkout/base/components/checkout-delivery-address/checkout-delivery-address.component.html b/feature-libs/checkout/base/components/checkout-delivery-address/checkout-delivery-address.component.html index c24bfb06b72..4e17cfc9078 100644 --- a/feature-libs/checkout/base/components/checkout-delivery-address/checkout-delivery-address.component.html +++ b/feature-libs/checkout/base/components/checkout-delivery-address/checkout-delivery-address.component.html @@ -58,6 +58,7 @@

[fitToContainer]="true" [content]="card.card" (sendCard)="selectAddress(card.address)" + [role]="'group'" > diff --git a/projects/storefrontlib/shared/components/card/card.component.html b/projects/storefrontlib/shared/components/card/card.component.html index 027a1e9fb08..d8912eb0ecb 100644 --- a/projects/storefrontlib/shared/components/card/card.component.html +++ b/projects/storefrontlib/shared/components/card/card.component.html @@ -2,6 +2,7 @@ *ngIf="content" class="cx-card" [tabindex]="border ? 0 : -1" + [attr.role]="role" [attr.aria-labelledby]="getLabel('content-header')" [attr.aria-describedby]="ariaDescribedBy" [class.cx-card-border]="border" diff --git a/projects/storefrontlib/shared/components/card/card.component.ts b/projects/storefrontlib/shared/components/card/card.component.ts index db210089bd5..1c664debadc 100644 --- a/projects/storefrontlib/shared/components/card/card.component.ts +++ b/projects/storefrontlib/shared/components/card/card.component.ts @@ -80,6 +80,9 @@ export class CardComponent implements OnInit { @Input() index: number; + @Input() + role?: string; + // ACTIONS setEditMode(): void {