Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: (CXSPA-8048) - Remove narration of Updating Cart in AddedToCartDialog component #19380

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -582,6 +582,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 @@ -725,6 +730,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 @@ -376,6 +376,7 @@ if (environment.cpq) {
a11yDialogTriggerRefocus: true,
a11yAddToWishlistFocus: true,
a11ySearchBoxFocusOnEscape: true,
a11yUpdatingCartNoNarration: true,
cmsBottomHeaderSlotUsingFlexStyles: true,
useSiteThemeService: false,
enableConsecutiveCharactersPasswordRequirement: true,
Expand Down