Skip to content

Commit

Permalink
fix: (CXSPA-8156) add landmark for checkout delivery address section
Browse files Browse the repository at this point in the history
  * add feature toggles;

  * closes https://jira.tools.sap/browse/CXSPA-8156
  • Loading branch information
StanislavSukhanov committed Oct 18, 2024
1 parent 15f3b44 commit cd9e468
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<section [attr.aria-label]="'checkoutAddress.shippingAddress' | cxTranslate">
@if (
featureConfigService?.isEnabled('a11yCheckoutDeliveryAddressAddLandmark')
) {
<section [attr.aria-label]="'checkoutAddress.shippingAddress' | cxTranslate">
<ng-template [ngTemplateOutlet]="content"></ng-template>
</section>
} @else {
<ng-template [ngTemplateOutlet]="content"></ng-template>
}

<ng-template #content>
<h2 class="cx-checkout-title d-none d-lg-block d-xl-block">
{{ 'checkoutAddress.shippingAddress' | cxTranslate }}
</h2>
Expand Down Expand Up @@ -100,7 +110,7 @@ <h2 class="cx-checkout-title d-none d-lg-block d-xl-block">
</ng-template>
</ng-container>
</ng-container>
</section>
</ng-template>

<ng-template #loading>
<div class="cx-spinner">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,12 @@ export interface FeatureTogglesInterface {
*/
a11yViewHoursButtonIconContrast?: boolean;

/**
* `CheckoutDeliveryAddressComponent` add a landmark for to get a
* 'new address button' associated with an appropriate content
*/
a11yCheckoutDeliveryAddressAddLandmark?: boolean;

/**
* In OCC cart requests, it puts parameters of a cart name and cart description
* into a request body, instead of query params.
Expand Down Expand Up @@ -761,6 +767,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
a11yAddToWishlistFocus: false,
a11ySearchBoxFocusOnEscape: false,
a11yViewHoursButtonIconContrast: false,
a11yCheckoutDeliveryAddressAddLandmark: false,
occCartNameAndDescriptionInHttpRequestBody: false,
cmsBottomHeaderSlotUsingFlexStyles: false,
useSiteThemeService: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ if (environment.cpq) {
a11yAddToWishlistFocus: true,
a11ySearchBoxFocusOnEscape: true,
a11yViewHoursButtonIconContrast: true,
a11yCheckoutDeliveryAddressAddLandmark: true,
cmsBottomHeaderSlotUsingFlexStyles: true,
useSiteThemeService: false,
enableConsecutiveCharactersPasswordRequirement: true,
Expand Down

0 comments on commit cd9e468

Please sign in to comment.