Skip to content

Commit

Permalink
fix: (CXSPA-1087) - Role presentation for cx-message wrapper (#19044)
Browse files Browse the repository at this point in the history
Co-authored-by: Miguel Estrada <[email protected]>
  • Loading branch information
Pio-Bar and developpeurweb authored Aug 19, 2024
1 parent 31c3de9 commit efc6415
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<cx-amend-order-items *ngIf="entries$ | async as entries" [entries]="entries">
</cx-amend-order-items>

<cx-form-errors [control]="form.get('entries')"></cx-form-errors>
<cx-form-errors
*cxFeature="'!a11yRepeatedCancelOrderError'"
[control]="form.get('entries')"
></cx-form-errors>

<ng-container *ngTemplateOutlet="actions"></ng-container>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import { NgModule } from '@angular/core';
import {
AuthGuard,
CmsConfig,
provideDefaultConfig,
FeaturesConfigModule,
I18nModule,
provideDefaultConfig,
} from '@spartacus/core';
import {
FormErrorsModule,
Expand All @@ -30,6 +31,7 @@ import { CancelOrderComponent } from './cancel-order.component';
AmendOrderActionsModule,
FormErrorsModule,
MessageComponentModule,
FeaturesConfigModule,
],
providers: [
provideDefaultConfig(<CmsConfig>{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@ export interface FeatureTogglesInterface {
*/
a11yLinkBtnsToTertiaryBtns?: boolean;

/**
* Removes duplicated error message from 'CancelOrderComponent'.
*/
a11yRepeatedCancelOrderError?: boolean;

/**
* Mofifies the template of 'AddedToCartDialogComponent' to retain the focus after the cart is updated.
* Improves its screen reader readout.
Expand Down Expand Up @@ -530,6 +535,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
a11yCxMessageFocus: false,
a11yLinkBtnsToTertiaryBtns: false,
a11yDeliveryModeRadiogroup: false,
a11yRepeatedCancelOrderError: false,
a11yAddedToCartActiveDialog: false,
a11yNgSelectMobileReadout: false,
occCartNameAndDescriptionInHttpRequestBody: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ if (environment.cpq) {
occCartNameAndDescriptionInHttpRequestBody: true,
a11yLinkBtnsToTertiaryBtns: true,
a11yDeliveryModeRadiogroup: true,
a11yRepeatedCancelOrderError: true,
a11yAddedToCartActiveDialog: true,
a11yNgSelectMobileReadout: true,
cmsBottomHeaderSlotUsingFlexStyles: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
tabindex="0"
>
<div class="cx-message-content">
<div class="cx-message-header">
<span class="cx-message-icon">
<cx-icon [type]="getIconType"></cx-icon>
<div role="presentation" class="cx-message-header">
<span role="presentation" class="cx-message-icon">
<cx-icon role="presentation" [type]="getIconType"></cx-icon>
</span>

<span class="cx-message-text">
Expand Down

0 comments on commit efc6415

Please sign in to comment.