From 8628647ff3450f429951d70fb83ee25c660d76bd Mon Sep 17 00:00:00 2001 From: Roman <129765378+rmch91@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:56:13 +0200 Subject: [PATCH] Revert "feat: (CXSPA-8024) - Focus issue on remove button at count 2" (#19388) --- .../base/styles/components/_item-counter.scss | 16 ---------- .../feature-toggles/config/feature-toggles.ts | 7 ---- .../spartacus/spartacus-features.module.ts | 1 - .../item-counter/item-counter.component.html | 24 -------------- .../item-counter.component.spec.ts | 32 ++++--------------- .../item-counter/item-counter.component.ts | 1 - .../item-counter/item-counter.module.ts | 10 ++---- 7 files changed, 9 insertions(+), 82 deletions(-) diff --git a/feature-libs/cart/base/styles/components/_item-counter.scss b/feature-libs/cart/base/styles/components/_item-counter.scss index bb6057d907a..f6cf1219c9c 100644 --- a/feature-libs/cart/base/styles/components/_item-counter.scss +++ b/feature-libs/cart/base/styles/components/_item-counter.scss @@ -13,7 +13,6 @@ -moz-appearance: textfield; } } - &.readonly { button { display: none; @@ -78,17 +77,8 @@ font-weight: var(--cx-font-weight-bold); } - // TODO: The styles for ":disabled" selector should be deleted when "a11yItemCounterFocus" feature flag has been removed &:disabled { color: var(--cx-color-light); - cursor: not-allowed; - } - - @include forFeature('a11yItemCounterFocus') { - &[aria-disabled='true'] { - color: var(--cx-color-light); - cursor: not-allowed; - } } @include forFeature('a11yImproveContrast') { @@ -100,15 +90,9 @@ &:focus { box-shadow: 0 0 0 0; } - // TODO: The styles for ":disabled" selector should be deleted when "a11yItemCounterFocus" feature flag has been removed &:disabled { color: var(--cx-color-dark); } - @include forFeature('a11yItemCounterFocus') { - &[aria-disabled='true'] { - color: var(--cx-color-dark); - } - } } } diff --git a/projects/core/src/features-config/feature-toggles/config/feature-toggles.ts b/projects/core/src/features-config/feature-toggles/config/feature-toggles.ts index b801e210391..864374fdc58 100644 --- a/projects/core/src/features-config/feature-toggles/config/feature-toggles.ts +++ b/projects/core/src/features-config/feature-toggles/config/feature-toggles.ts @@ -576,12 +576,6 @@ export interface FeatureTogglesInterface { */ a11ySearchBoxFocusOnEscape?: boolean; - /** - * In `ItemCounterComponenet`, Remove button no longer lose focus after activating when count is 2. - * Add button no longer lose focus after activating when count is `max - 1`. - */ - a11yItemCounterFocus?: boolean; - /** * In OCC cart requests, it puts parameters of a cart name and cart description * into a request body, instead of query params. @@ -724,7 +718,6 @@ export const defaultFeatureToggles: Required = { a11yDialogTriggerRefocus: false, a11yAddToWishlistFocus: false, a11ySearchBoxFocusOnEscape: false, - a11yItemCounterFocus: false, occCartNameAndDescriptionInHttpRequestBody: false, cmsBottomHeaderSlotUsingFlexStyles: false, useSiteThemeService: false, diff --git a/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts b/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts index 3450ac8113d..b2749c81b2a 100644 --- a/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts +++ b/projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts @@ -375,7 +375,6 @@ if (environment.cpq) { a11yDialogTriggerRefocus: true, a11yAddToWishlistFocus: true, a11ySearchBoxFocusOnEscape: true, - a11yItemCounterFocus: true, cmsBottomHeaderSlotUsingFlexStyles: true, useSiteThemeService: false, enableConsecutiveCharactersPasswordRequirement: true, diff --git a/projects/storefrontlib/shared/components/item-counter/item-counter.component.html b/projects/storefrontlib/shared/components/item-counter/item-counter.component.html index 535ed57cdcb..abf99b30313 100644 --- a/projects/storefrontlib/shared/components/item-counter/item-counter.component.html +++ b/projects/storefrontlib/shared/components/item-counter/item-counter.component.html @@ -1,16 +1,4 @@ - -