Skip to content

Commit 07f252a

Browse files
authored
Merge branch 'develop' into bugfix/CXSPA-8567
2 parents ed0a87d + 53ca163 commit 07f252a

File tree

10 files changed

+61
-14
lines changed

10 files changed

+61
-14
lines changed

Diff for: feature-libs/checkout/b2b/components/checkout-delivery-address/checkout-delivery-address.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ <h2 class="cx-checkout-title d-none d-lg-block d-xl-block">
4848
[fitToContainer]="true"
4949
[content]="card.card"
5050
(sendCard)="selectAddress(card.address)"
51+
[role]="'group'"
5152
></cx-card>
5253
</div>
5354
</div>

Diff for: feature-libs/checkout/base/components/checkout-delivery-address/checkout-delivery-address.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ <h2 class="cx-checkout-title d-none d-lg-block d-xl-block">
5858
[fitToContainer]="true"
5959
[content]="card.card"
6060
(sendCard)="selectAddress(card.address)"
61+
[role]="'group'"
6162
></cx-card>
6263
</div>
6364
</div>

Diff for: feature-libs/product/image-zoom/styles/_product-image-zoom-view.scss

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ cx-product-image-zoom-view {
157157
.cx-image-container .cx-zoom-btn {
158158
background-color: var(--cx-color-dark);
159159
color: var(--cx-color-light);
160+
--cx-color-visual-focus: #1f3a93;
160161
}
161162
}
162163
}

Diff for: projects/assets/src/translations/en/common.json

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"loaded": "Loaded",
2828
"results": "Results",
2929
"of": "of",
30+
"ngSelectDropdownOptionsList": "Options",
3031
"required": "required",
3132
"zoomIn": "Zoom in",
3233
"zoomOut": "Zoom out",

Diff for: projects/core/src/features-config/feature-toggles/config/feature-toggles.ts

+17-10
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,12 @@ export interface FeatureTogglesInterface {
614614
*/
615615
a11yNgSelectCloseDropdownOnEscape?: boolean;
616616

617+
/**
618+
* 'NgSelectA11yDirective' will customize a ng-select dropdowns by setting custom
619+
* ariaLabelDropdown ng-select attribute value to provided common.ngSelectDropdownOptionsList translation
620+
*/
621+
a11yNgSelectAriaLabelDropdownCustomized?: boolean;
622+
617623
/**
618624
* Removes duplicated error message from 'CancelOrderComponent'.
619625
*/
@@ -992,8 +998,8 @@ export interface FeatureTogglesInterface {
992998
export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
993999
showDeliveryOptionsTranslation: false,
9941000
formErrorsDescriptiveMessages: true,
995-
showSearchingCustomerByOrderInASM: false,
996-
showStyleChangesInASM: false,
1001+
showSearchingCustomerByOrderInASM: true,
1002+
showStyleChangesInASM: true,
9971003
shouldHideAddToCartForUnpurchasableProducts: true,
9981004
useExtractedBillingAddressComponent: true,
9991005
showBillingAddressInDigitalPayments: true,
@@ -1070,23 +1076,24 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
10701076
a11yTabComponent: false,
10711077
a11yCarouselArrowKeysNavigation: false,
10721078
a11yPickupOptionsTabs: false,
1073-
a11yNotificationsOnConsentChange: false,
1079+
a11yNotificationsOnConsentChange: true,
10741080
a11yDisabledCouponAndQuickOrderActionButtonsInsteadOfRequiredFields: true,
10751081
a11yFacetsDialogFocusHandling: true,
10761082
a11yResetFocusAfterNavigating: false,
10771083
headerLayoutForSmallerViewports: false,
1078-
a11yStoreFinderAlerts: false,
1084+
a11yStoreFinderAlerts: true,
10791085
a11yStoreFinderLabel: false,
1080-
a11yFormErrorMuteIcon: false,
1081-
a11yCxMessageFocus: false,
1086+
a11yFormErrorMuteIcon: true,
1087+
a11yCxMessageFocus: true,
10821088
a11yLinkBtnsToTertiaryBtns: false,
10831089
a11yRepeatedPageTitleFix: false,
1084-
a11yDeliveryModeRadiogroup: false,
1090+
a11yDeliveryModeRadiogroup: true,
10851091
a11yNgSelectOptionsCount: false,
10861092
a11yNgSelectCloseDropdownOnEscape: false,
1093+
a11yNgSelectAriaLabelDropdownCustomized: false,
10871094
a11yRepeatedCancelOrderError: false,
10881095
a11yAddedToCartActiveDialog: false,
1089-
a11yNgSelectMobileReadout: false,
1096+
a11yNgSelectMobileReadout: true,
10901097
a11yDeliveryMethodFieldset: false,
10911098
a11yShowMoreReviewsBtnFocus: false,
10921099
a11yQuickOrderAriaControls: false,
@@ -1127,8 +1134,8 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
11271134
a11yRepeatingButtonsUniqueLabels: false,
11281135
a11yHighContrastBorders: false,
11291136
a11yRegionAssociatedHeaders: false,
1130-
occCartNameAndDescriptionInHttpRequestBody: false,
1131-
cmsBottomHeaderSlotUsingFlexStyles: false,
1137+
occCartNameAndDescriptionInHttpRequestBody: true,
1138+
cmsBottomHeaderSlotUsingFlexStyles: true,
11321139
useSiteThemeService: false,
11331140
enableConsecutiveCharactersPasswordRequirement: false,
11341141
enablePasswordsCannotMatchInPasswordUpdateForm: false,

Diff for: projects/storefrontapp/src/app/spartacus/spartacus-features.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ if (environment.cpq) {
389389
*/
390390
a11yNgSelectOptionsCount: false,
391391
a11yNgSelectCloseDropdownOnEscape: true,
392+
a11yNgSelectAriaLabelDropdownCustomized: true,
392393
a11yRepeatedCancelOrderError: true,
393394
a11yAddedToCartActiveDialog: true,
394395
a11yNgSelectMobileReadout: true,

Diff for: projects/storefrontlib/shared/components/card/card.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*ngIf="content"
33
class="cx-card"
44
[tabindex]="border ? 0 : -1"
5+
[attr.role]="role"
56
[attr.aria-labelledby]="getLabel('content-header')"
67
[attr.aria-describedby]="ariaDescribedBy"
78
[class.cx-card-border]="border"

Diff for: projects/storefrontlib/shared/components/card/card.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ export class CardComponent implements OnInit {
8080
@Input()
8181
index: number;
8282

83+
@Input()
84+
role?: string;
85+
8386
// ACTIONS
8487

8588
setEditMode(): void {

Diff for: projects/storefrontlib/shared/components/ng-select-a11y/ng-select-a11y.directive.ts

+16-4
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ export class NgSelectA11yDirective implements AfterViewInit {
4141
*/
4242
@Input() cxNgSelectA11y: { ariaLabel?: string; ariaControls?: string };
4343

44-
//TODO: CXSPA-9005: Remove this property in next major release
45-
/**
46-
* @deprecated since 2211.33
47-
*/
4844
protected translationService = inject(TranslationService);
4945
protected domSanitizer = inject(DomSanitizer);
5046
protected selectComponent = inject(NgSelectComponent);
@@ -105,6 +101,13 @@ export class NgSelectA11yDirective implements AfterViewInit {
105101

106102
this.renderer.setAttribute(inputCombobox, 'role', 'combobox');
107103
this.renderer.setAttribute(inputCombobox, 'aria-expanded', 'false');
104+
if (
105+
this.featureConfigService?.isEnabled(
106+
'a11yNgSelectAriaLabelDropdownCustomized'
107+
)
108+
) {
109+
this.customizeNgSelectAriaLabelDropdown();
110+
}
108111

109112
const isOpened$ = this.selectComponent.openEvent.pipe(map(() => 'true'));
110113
const isClosed$ = this.selectComponent.closeEvent.pipe(map(() => 'false'));
@@ -202,4 +205,13 @@ export class NgSelectA11yDirective implements AfterViewInit {
202205
}
203206
observer.disconnect();
204207
}
208+
209+
customizeNgSelectAriaLabelDropdown() {
210+
this.translationService
211+
.translate('common.ngSelectDropdownOptionsList')
212+
.pipe(take(1))
213+
.subscribe((translation) => {
214+
this.selectComponent.ariaLabelDropdown = translation;
215+
});
216+
}
205217
}

Diff for: tools/schematics/testing.ts

+19
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,20 @@ const commands = [
8484
] as const;
8585
type Command = (typeof commands)[number];
8686

87+
const isVoiceNotifyEnabled = process.argv.includes('--voice-notify');
88+
if (isVoiceNotifyEnabled) {
89+
console.log('Voice notifications enabled');
90+
}
91+
function voiceAlert(message: string): void {
92+
if (isVoiceNotifyEnabled) {
93+
try {
94+
execSync(`say "${message}"`);
95+
} catch (error) {
96+
console.warn('Voice notification failed:', error);
97+
}
98+
}
99+
}
100+
87101
const buildLibRegEx = new RegExp('build (.*?)/schematics');
88102
const verdaccioRegistryUrl = 'http://localhost:4873/';
89103
const originalRegistryUrl = execSync('npm config get @spartacus:registry')
@@ -204,9 +218,11 @@ async function executeCommand(command: Command): Promise<void> {
204218
switch (command) {
205219
case 'publish':
206220
publishLibs();
221+
voiceAlert('Publishing completed');
207222
break;
208223
case 'build projects/schematics':
209224
buildSchematics({ publish: true });
225+
voiceAlert('Schematics build completed');
210226
break;
211227
case 'build asm/schematics':
212228
case 'build cart/schematics':
@@ -240,12 +256,15 @@ async function executeCommand(command: Command): Promise<void> {
240256
const lib =
241257
buildLibRegEx.exec(command)?.pop() ?? 'LIB-REGEX-DOES-NOT-MATCH';
242258
buildSchematicsAndPublish(`npm run build:${lib}`);
259+
voiceAlert(`Schematics build of lib ${lib} completed`);
243260
break;
244261
case 'build all libs':
245262
buildLibs();
263+
voiceAlert('All libraries build completed');
246264
break;
247265
case 'test all schematics':
248266
testAllSchematics();
267+
voiceAlert('All schematics tests completed');
249268
break;
250269
case 'exit':
251270
beforeExit();

0 commit comments

Comments
 (0)