Skip to content

Commit

Permalink
fix(a11y): Focus outline visible for future stock accordion (#19459) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrozdsap authored Nov 25, 2024
1 parent 5d8ac1a commit e961d4b
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ cx-page-slot {
padding-inline-start: 20px;
padding-inline-end: 20px;
padding-block-end: 0px;

@include forFeature('a11yPdpGridArrangement') {
grid-row: unset;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ cx-future-stock-accordion {
padding-inline-start: unset;
margin-inline-start: 1.25rem;
padding: 0;

@include media-breakpoint-down(md) {
margin-inline-start: 0;
}
}
margin: 0.5rem auto;
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,19 @@ export interface FeatureTogglesInterface {
*/
allPageMetaResolversEnabledInCsr?: boolean;

/**
* Modifies grid arrangement in Product Details Page for better accessibility:
* - add to cart button should be last step
* - future stock accordion is moved before add to cart button
*/
a11yPdpGridArrangement?: boolean;

/**
* CDS/ISS is integrated into the SAP Cloud Identity Service (SCI). The downstream services use different domains and URL formats.
* This feature toggle can be used to make the CDS module use these new URLs.
*/
sciEnabled?: boolean;

/**
* When enabled, allows to provide extended formats and media queries for <picture> element if used in MediaComponent.
*
Expand Down Expand Up @@ -911,5 +924,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
enableConsecutiveCharactersPasswordRequirement: false,
enablePasswordsCannotMatchInPasswordUpdateForm: false,
allPageMetaResolversEnabledInCsr: false,
a11yPdpGridArrangement: false,
sciEnabled: false,
useExtendedMediaComponentConfiguration: false,
};
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ if (environment.cpq) {
enableConsecutiveCharactersPasswordRequirement: true,
enablePasswordsCannotMatchInPasswordUpdateForm: true,
allPageMetaResolversEnabledInCsr: true,
a11yPdpGridArrangement: true,
sciEnabled: true,
useExtendedMediaComponentConfiguration: true,
a11yWrapReviewOrderInSection: true,
};
Expand Down
1 change: 1 addition & 0 deletions projects/storefrontlib/layout/main/storefront.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export class StorefrontComponent implements OnInit, OnDestroy {
useFeatureStyles('a11yImproveContrast');
useFeatureStyles('cmsBottomHeaderSlotUsingFlexStyles');
useFeatureStyles('headerLayoutForSmallerViewports');
useFeatureStyles('a11yPdpGridArrangement');
}

ngOnInit(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
grid-template-columns: 1fr 1fr;
grid-template-rows: repeat(5, auto) 1fr;

@include forFeature('a11yPdpGridArrangement') {
grid-template-rows: repeat(6, auto) 1fr;
}

cx-product-images {
grid-column: 1;
grid-row: 1 / span 6;

@include forFeature('a11yPdpGridArrangement') {
grid-row: 1 / span 7;
}
}

cx-product-intro {
Expand All @@ -42,6 +50,10 @@
padding-inline-end: 20px;
padding-bottom: 0px;
padding-inline-start: 20px;

@include forFeature('a11yPdpGridArrangement') {
grid-row: unset;
}
}

cx-stock-notification {
Expand Down

0 comments on commit e961d4b

Please sign in to comment.