Skip to content

Commit

Permalink
Merge branch 'develop' into feature/CXSPA-7992-button-icon-doesnt-mee…
Browse files Browse the repository at this point in the history
…t-a-colour-contrast
  • Loading branch information
StanislavSukhanov authored Oct 17, 2024
2 parents f26b49b + e9a1c2e commit 0a66ec4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
*ngIf="hasStock"
[max]="maxQuantity"
[control]="addToCartForm.get('quantity')"
[ariaDescribedById]="'add-to-card-stock-info'"
></cx-item-counter>

<span class="info">
<span class="info" id="add-to-card-stock-info">
<span *ngIf="showInventory$ | async">{{ getInventory() }}</span>
{{
hasStock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,37 +660,37 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
propagateErrorsToServer: false,
ssrStrictErrorHandlingForHttpAndNgrx: false,
productConfiguratorDeltaRendering: false,
a11yRequiredAsterisks: false,
a11yQuantityOrderTabbing: false,
a11yNavigationUiKeyboardControls: false,
a11yRequiredAsterisks: true,
a11yQuantityOrderTabbing: true,
a11yNavigationUiKeyboardControls: true,
a11yNavMenuExpandStateReadout: false,
a11yOrderConfirmationHeadingOrder: false,
a11yStarRating: false,
a11yViewChangeAssistiveMessage: false,
a11yOrderConfirmationHeadingOrder: true,
a11yStarRating: true,
a11yViewChangeAssistiveMessage: true,
a11yPreventHorizontalScroll: false,
a11yReorderDialog: false,
a11yPopoverFocus: false,
a11yScheduleReplenishment: false,
a11yScrollToTop: false,
a11ySavedCartsZoom: false,
a11ySortingOptionsTruncation: false,
a11yExpandedFocusIndicator: false,
a11yCheckoutDeliveryFocus: false,
a11yMobileVisibleFocus: false,
a11yOrganizationsBanner: false,
a11yOrganizationListHeadingOrder: false,
a11yReorderDialog: true,
a11yPopoverFocus: true,
a11yScheduleReplenishment: true,
a11yScrollToTop: true,
a11ySavedCartsZoom: true,
a11ySortingOptionsTruncation: true,
a11yExpandedFocusIndicator: true,
a11yCheckoutDeliveryFocus: true,
a11yMobileVisibleFocus: true,
a11yOrganizationsBanner: true,
a11yOrganizationListHeadingOrder: true,
a11yCartImportConfirmationMessage: false,
a11yReplenishmentOrderFieldset: false,
a11yListOversizedFocus: false,
a11yStoreFinderOverflow: false,
a11yReplenishmentOrderFieldset: true,
a11yListOversizedFocus: true,
a11yStoreFinderOverflow: true,
a11yMobileFocusOnFirstNavigationItem: false,
a11yCartSummaryHeadingOrder: false,
a11yCartSummaryHeadingOrder: true,
a11ySearchBoxMobileFocus: false,
a11yFacetKeyboardNavigation: false,
a11yUnitsListKeyboardControls: false,
a11yCartItemsLinksStyles: false,
a11yUnitsListKeyboardControls: true,
a11yCartItemsLinksStyles: true,
a11yHideSelectBtnForSelectedAddrOrPayment: false,
a11yFocusableCarouselControls: false,
a11yFocusableCarouselControls: true,
a11yUseTrapTabInsteadOfTrapInDialogs: false,
cmsGuardsServiceUseGuardsComposer: false,
cartQuickOrderRemoveListeningToFailEvent: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
class="results"
id="results"
(click)="close($any($event), true)"
role="dialog"
role="listbox"
[class.no-headers]="
!isEnabledFeature(searchBoxFeatures.RECENT_SEARCHES_FEATURE) &&
!isEnabledFeature(searchBoxFeatures.TRENDING_SEARCHES_FEATURE) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
(keyup.enter)="updateValue()"
[cxFocus]="{ key: 'qty' }"
attr.aria-label="{{ 'itemCounter.quantity' | cxTranslate }}"
[attr.aria-describedby]="ariaDescribedById"
/>
<button
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ export class ItemCounterComponent implements OnInit, OnDestroy {
*/
@Input() allowZero = false;

/**
* ID of the element associated with the number input,
* so it gets narrated by a screen reader
*/
@Input() ariaDescribedById: string = '';

/**
* In readonly mode the item counter will only be shown as a label,
* the form controls are not rendered.
Expand Down

0 comments on commit 0a66ec4

Please sign in to comment.