Skip to content

Commit

Permalink
Merge branch 'develop' into feature/CXSPA-9192
Browse files Browse the repository at this point in the history
  • Loading branch information
Matejk00 authored Jan 10, 2025
2 parents 86926ba + f2ce016 commit bb90dab
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export class SavedCartListComponent implements OnInit, OnDestroy {
) {
useFeatureStyles('a11ySavedCartsZoom');
useFeatureStyles('a11yQTY2Quantity');
useFeatureStyles('a11yHighContrastBorders');
}

ngOnInit(): void {
Expand Down
9 changes: 9 additions & 0 deletions feature-libs/cart/saved-cart/styles/_saved-cart-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ cx-saved-cart-list {
font-weight: $font-weight-normal;
}
}

@include cx-highContrastTheme {
@include forFeature('a11yHighContrastBorders') {
border-color: var(--cx-color-dark);
tr {
border-bottom-color: var(--cx-color-dark);
}
}
}
}

.cx-saved-cart-list-no-saved-carts {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ import {
CheckoutPaymentFacade,
CheckoutStepType,
} from '@spartacus/checkout/base/root';
import { PaymentDetails, TranslationService } from '@spartacus/core';
import {
PaymentDetails,
TranslationService,
useFeatureStyles,
} from '@spartacus/core';
import { billingAddressCard, paymentMethodCard } from '@spartacus/order/root';
import { Card, ICON_TYPE } from '@spartacus/storefront';
import { combineLatest, Observable } from 'rxjs';
import { Observable, combineLatest } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import { CheckoutStepService } from '../../services/checkout-step.service';

Expand All @@ -32,7 +36,9 @@ export class CheckoutReviewPaymentComponent {
protected checkoutStepService: CheckoutStepService,
protected checkoutPaymentFacade: CheckoutPaymentFacade,
protected translationService: TranslationService
) {}
) {
useFeatureStyles('a11yHighContrastBorders');
}

paymentDetails$: Observable<PaymentDetails | undefined> =
this.checkoutPaymentFacade.getPaymentDetailsState().pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@
background-color: var(--cx-color-background);
.cx-review-summary-payment-card {
background-color: var(--cx-color-background);
@include forFeature('a11yHighContrastBorders') {
border-color: var(--cx-color-dark);
}
}
.cx-review-summary {
background-color: var(--cx-color-background);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
*/

import { Component } from '@angular/core';
import { RoutingService, TranslationService } from '@spartacus/core';
import {
RoutingService,
TranslationService,
useFeatureStyles,
} from '@spartacus/core';
import {
CustomerTicketingConfig,
CustomerTicketingFacade,
Expand All @@ -14,7 +18,7 @@ import {
TicketList,
} from '@spartacus/customer-ticketing/root';
import { ICON_TYPE } from '@spartacus/storefront';
import { combineLatest, Observable } from 'rxjs';
import { Observable, combineLatest } from 'rxjs';
import { map, tap } from 'rxjs/operators';

@Component({
Expand All @@ -27,7 +31,9 @@ export class CustomerTicketingListComponent {
protected routingService: RoutingService,
protected translationService: TranslationService,
protected customerTicketingConfig: CustomerTicketingConfig
) {}
) {
useFeatureStyles('a11yHighContrastBorders');
}
PAGE_SIZE =
this.customerTicketingConfig.customerTicketing?.listViewPageSize || 5;
sortType: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@
}
}
}

@include cx-highContrastTheme {
@include forFeature('a11yHighContrastBorders') {
border-top-color: var(--cx-color-dark);
tr {
border-bottom-color: var(--cx-color-dark);
}
}
}
}

.cx-ticketing-list-thead-mobile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ cx-account-summary-document-filter {
@include forFeature('a11yImproveContrast') {
border-color: var(--cx-color-dark);
}

@include cx-highContrastTheme {
background-color: var(--cx-color-background);
color: var(--color-text);
}
}

.cx-account-summary-document-filter-form-button-block {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,13 @@ export interface FeatureTogglesInterface {
*/
a11yHideConsentButtonWhenBannerVisible?: boolean;

/**
* Ensures that borders across all UI elements are visible and meet accessibility standards in high-contrast dark and light themes.
* This change is applied globally to enhance usability for users relying on high-contrast modes.
* Affects: CustomerTickingListComponent, CheckoutReviewPaymentComponent, SavedCartListComponent
*/
a11yHighContrastBorders?: 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 @@ -1078,6 +1085,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
a11yFocusOnCardAfterSelecting: false,
a11ySearchableDropdownFirstElementFocus: false,
a11yHideConsentButtonWhenBannerVisible: false,
a11yHighContrastBorders: false,
occCartNameAndDescriptionInHttpRequestBody: false,
cmsBottomHeaderSlotUsingFlexStyles: false,
useSiteThemeService: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,16 @@ context('B2B - User Registration', () => {

fillOrganizationUserRegistrationForm(user);
submitOrganizationUserRegistrationForm();
verifyGlobalMessageAfterRegistration(
'User with this e-mail address already exists.'
);

/*
* CXSPA-9183
* Leave below check commented until cx-server gets upgraded to 2211.32
* tbd after upgrade: POST orgUsers request should expect '201 created' response.
*/

// verifyGlobalMessageAfterRegistration(
// 'User with this e-mail address already exists.'
// );
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ if (environment.cpq) {
a11yFocusOnCardAfterSelecting: true,
a11ySearchableDropdownFirstElementFocus: true,
a11yHideConsentButtonWhenBannerVisible: true,
a11yHighContrastBorders: true,
cmsBottomHeaderSlotUsingFlexStyles: true,
useSiteThemeService: true,
enableConsecutiveCharactersPasswordRequirement: true,
Expand Down
9 changes: 9 additions & 0 deletions projects/storefrontstyles/scss/cxbase/blocks/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,12 @@ button,
@include visible-focus();
}
}

// override opacity of bootstrap .close class
button.close:not(:disabled):not(.disabled) {
@include forFeature('a11yImproveContrast') {
&:focus {
opacity: 1;
}
}
}

0 comments on commit bb90dab

Please sign in to comment.