Skip to content

Commit

Permalink
Merge 6dc9f77 into 6eb3258
Browse files Browse the repository at this point in the history
  • Loading branch information
petarmarkov9449 authored Oct 10, 2024
2 parents 6eb3258 + 6dc9f77 commit d451df5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,27 @@
aria-atomic="true"
class="cx-dialog-header modal-header"
>
<div id="dialogTitle" class="cx-dialog-title modal-title">
<div
*cxFeature="'a11yUpdatingCartNoNarration'"
id="dialogTitle"
class="cx-dialog-title modal-title"
>
<span *ngIf="loaded$ | async">
{{
(addedEntryWasMerged$ | async)
? ('addToCart.itemsIncrementedInYourCart' | cxTranslate)
: ('addToCart.itemsAddedToYourCart' | cxTranslate)
}}
</span>
<span *ngIf="!(loaded$ | async)" aria-hidden="true">
{{ 'addToCart.updatingCart' | cxTranslate }}
</span>
</div>
<div
*cxFeature="'!a11yUpdatingCartNoNarration'"
id="dialogTitle"
class="cx-dialog-title modal-title"
>
{{
(loaded$ | async)
? (addedEntryWasMerged$ | async)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export class AddedToCartDialogComponent implements OnInit, OnDestroy {
) {
useFeatureStyles('a11yExpandedFocusIndicator');
useFeatureStyles('a11yPreventHorizontalScroll');
useFeatureStyles('a11yUpdatingCartNoNarration');
}

ngOnInit(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,11 @@ export interface FeatureTogglesInterface {
*/
a11ySearchBoxFocusOnEscape?: boolean;

/**
* In `AddedToCartDialogComponent`, `Updating cart...` should no longer read by a screen reader.
*/
a11yUpdatingCartNoNarration?: 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 @@ -718,6 +723,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
a11yDialogTriggerRefocus: false,
a11yAddToWishlistFocus: false,
a11ySearchBoxFocusOnEscape: false,
a11yUpdatingCartNoNarration: false,
occCartNameAndDescriptionInHttpRequestBody: false,
cmsBottomHeaderSlotUsingFlexStyles: false,
useSiteThemeService: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ if (environment.cpq) {
a11yDialogTriggerRefocus: true,
a11yAddToWishlistFocus: true,
a11ySearchBoxFocusOnEscape: true,
a11yUpdatingCartNoNarration: true,
cmsBottomHeaderSlotUsingFlexStyles: true,
useSiteThemeService: false,
enableConsecutiveCharactersPasswordRequirement: true,
Expand Down

0 comments on commit d451df5

Please sign in to comment.