diff --git a/feature-libs/cart/saved-cart/components/add-to-saved-cart/add-to-saved-cart.component.ts b/feature-libs/cart/saved-cart/components/add-to-saved-cart/add-to-saved-cart.component.ts index 125fe8f05e4..e0f9f4c248c 100644 --- a/feature-libs/cart/saved-cart/components/add-to-saved-cart/add-to-saved-cart.component.ts +++ b/feature-libs/cart/saved-cart/components/add-to-saved-cart/add-to-saved-cart.component.ts @@ -14,9 +14,9 @@ import { ViewContainerRef, } from '@angular/core'; import { ActiveCartFacade, Cart } from '@spartacus/cart/base/root'; -import { AuthService, RoutingService } from '@spartacus/core'; -import { LaunchDialogService, LAUNCH_CALLER } from '@spartacus/storefront'; -import { combineLatest, Observable, Subscription } from 'rxjs'; +import { AuthService, RoutingService, useFeatureStyles } from '@spartacus/core'; +import { LAUNCH_CALLER, LaunchDialogService } from '@spartacus/storefront'; +import { Observable, Subscription, combineLatest } from 'rxjs'; import { map, take, tap } from 'rxjs/operators'; @Component({ @@ -43,7 +43,9 @@ export class AddToSavedCartComponent implements OnInit, OnDestroy { protected routingService: RoutingService, protected vcr: ViewContainerRef, protected launchDialogService: LaunchDialogService - ) {} + ) { + useFeatureStyles('a11yExpandedFocusIndicator'); + } ngOnInit(): void { this.cart$ = combineLatest([ diff --git a/feature-libs/cart/saved-cart/styles/_add-to-saved-cart.scss b/feature-libs/cart/saved-cart/styles/_add-to-saved-cart.scss index 2cd12a5a119..85c0741abfd 100644 --- a/feature-libs/cart/saved-cart/styles/_add-to-saved-cart.scss +++ b/feature-libs/cart/saved-cart/styles/_add-to-saved-cart.scss @@ -20,6 +20,24 @@ cx-add-to-saved-cart { } } + // TODO: (CXSPA-5709) Remove feature flag next major + @include forFeature('a11yExpandedFocusIndicator') { + .cx-action-link { + &:nth-child(n + 2) { + margin-inline-end: unset; + position: relative; + margin-inline-start: 1rem; + &:before { + display: unset; + position: absolute; + left: -0.75rem; + margin-inline-start: unset; + margin-inline-end: unset; + } + } + } + } + @include media-breakpoint-up(sm) { justify-content: flex-end; } diff --git a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-search.ts b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-search.ts index f6f6c6a8ffe..86c6bbc4de9 100644 --- a/projects/storefrontapp-e2e-cypress/cypress/helpers/product-search.ts +++ b/projects/storefrontapp-e2e-cypress/cypress/helpers/product-search.ts @@ -13,7 +13,7 @@ export const firstProductItemSelector = `${productItemSelector}:first`; export const pageLinkSelector = 'cx-pagination a.current'; export const sortingOptionSelector = 'cx-sorting .ng-select:first'; export const firstProductPriceSelector = `${firstProductItemSelector} .cx-product-price`; -export const firstProductNameSelector = `${firstProductItemSelector} a.cx-product-name`; +export const firstProductNameSelector = `${firstProductItemSelector} .cx-product-name`; export const searchUrlPrefix = `${Cypress.env('OCC_PREFIX')}/${Cypress.env( 'BASE_SITE' )}/products/search`; @@ -111,9 +111,7 @@ export function searchResult() { 'have.length', PRODUCT_LISTING.PRODUCTS_PER_PAGE ); - cy.get(firstProductItemSelector).within(() => { - cy.get('a.cx-product-name').should('be.visible'); - }); + cy.get(firstProductNameSelector).should('be.visible'); }); } diff --git a/projects/storefrontapp/src/app/app.module.ts b/projects/storefrontapp/src/app/app.module.ts index 0c271f6731b..f1a977f1a6a 100644 --- a/projects/storefrontapp/src/app/app.module.ts +++ b/projects/storefrontapp/src/app/app.module.ts @@ -97,6 +97,7 @@ if (!environment.production) { a11yNavigationUiKeyboardControls: true, a11yOrderConfirmationHeadingOrder: true, a11yStarRating: true, + a11yExpandedFocusIndicator: true, a11yCheckoutDeliveryFocus: true, }, }), diff --git a/projects/storefrontlib/cms-components/product/product-list/product-list-item/product-list-item.component.html b/projects/storefrontlib/cms-components/product/product-list/product-list-item/product-list-item.component.html index 20c222341df..ab33d434cab 100644 --- a/projects/storefrontlib/cms-components/product/product-list/product-list-item/product-list-item.component.html +++ b/projects/storefrontlib/cms-components/product/product-list/product-list-item/product-list-item.component.html @@ -19,12 +19,24 @@