Skip to content

Commit

Permalink
fix: Brought back a11yCloseProductImageBtnFocus focus flag (#19340)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pio-Bar authored and rmch91 committed Oct 7, 2024
1 parent fc29094 commit ee513d2
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export class ImportEntriesDialogComponent {

constructor(protected launchDialogService: LaunchDialogService) {
useFeatureStyles('a11yExpandedFocusIndicator');
useFeatureStyles('a11yVisibleFocusOverflows');
}

isNewCartForm(context: AddOrderEntriesContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ cx-import-entries-dialog {
font-weight: var(--cx-font-weight-semi);
line-height: var(--cx-line-height, 1.2222222222);
}

@include forFeature('a11yVisibleFocusOverflows') {
.cx-import-entries-close {
margin: 0;
padding: 0;
}
}
}

cx-import-entries-form,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class ProductImageZoomDialogComponent {
protected launchDialogService: LaunchDialogService,
protected el: ElementRef
) {
useFeatureStyles('a11yCloseProductImageBtnFocus');
useFeatureStyles('a11yExpandedFocusIndicator');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ cx-product-image-zoom-dialog {
padding: 1rem;
}

@include forFeature('a11yCloseProductImageBtnFocus') {
.close {
outline-offset: -4px;
@include forFeature('a11yExpandedFocusIndicator') {
outline-offset: unset;
}
}
}

@include cx-highContrastTheme {
background-color: var(--cx-color-background);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ export interface FeatureTogglesInterface {
*/
a11yTruncatedTextForResponsiveView?: boolean;

/**
* When enabled focus outline on the close button inside `ProductImageZoomDialogComponent`
* will be fully visible
*/
a11yCloseProductImageBtnFocus?: boolean;

/**
* Modifies getAriaLabel method in 'PaginationComponent' to return a sematic label.
*/
Expand Down Expand Up @@ -671,6 +677,7 @@ export const defaultFeatureToggles: Required<FeatureTogglesInterface> = {
a11yPreventCartItemsFormRedundantRecreation: false,
a11yPreventSRFocusOnHiddenElements: false,
a11yMyAccountLinkOutline: false,
a11yCloseProductImageBtnFocus: false,
a11yNotificationPreferenceFieldset: false,
a11yImproveContrast: false,
a11yEmptyWishlistHeading: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ if (environment.cpq) {
a11ySemanticPaginationLabel: true,
a11yPreventCartItemsFormRedundantRecreation: true,
a11yMyAccountLinkOutline: true,
a11yCloseProductImageBtnFocus: true,
a11yNotificationPreferenceFieldset: true,
a11yImproveContrast: true,
a11yEmptyWishlistHeading: true,
Expand Down

0 comments on commit ee513d2

Please sign in to comment.