Skip to content

Commit

Permalink
fix: (CXSPA-9071) - Add aria-label for the buttons in ProductImageZoo…
Browse files Browse the repository at this point in the history
…mView (#19726)
  • Loading branch information
petarmarkov9449 authored Dec 6, 2024
1 parent 790fe55 commit 6e538c5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
},
"productImageZoomDialog": {
"zoomedInImage": "Zoomed in image",
"previousSlide": "Previous slide",
"nextSlide": "Next slide",
"close": "Close"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<div class="cx-navigate-image">
<button
class="btn btn-link"
[attr.aria-label]="'productImageZoomDialog.previousSlide' | cxTranslate"
[attr.title]="'productImageZoomDialog.previousSlide' | cxTranslate"
*ngIf="getPreviousProduct(thumbs) | async as previousProduct"
(click)="openImage(previousProduct.container)"
>
Expand Down Expand Up @@ -81,6 +83,8 @@
<div class="cx-navigate-image">
<button
class="btn btn-link"
[attr.aria-label]="'productImageZoomDialog.nextSlide' | cxTranslate"
[attr.title]="'productImageZoomDialog.nextSlide' | cxTranslate"
*ngIf="getNextProduct(thumbs) | async as nextProduct"
(click)="openImage(nextProduct.container)"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { By } from '@angular/platform-browser';
import {
FeatureConfigService,
FeaturesConfigModule,
I18nTestingModule,
ImageGroup,
Product,
} from '@spartacus/core';
Expand All @@ -26,6 +27,7 @@ import {
CurrentProductService,
} from '@spartacus/storefront';
import { EMPTY, Observable, of } from 'rxjs';

import { ProductImageZoomViewComponent } from './product-image-zoom-view.component';

const firstImage = {
Expand Down Expand Up @@ -134,7 +136,7 @@ describe('ProductImageZoomViewComponent', () => {

beforeEach(async () => {
TestBed.configureTestingModule({
imports: [FeaturesConfigModule],
imports: [I18nTestingModule, FeaturesConfigModule],
declarations: [
ProductImageZoomViewComponent,
MockIconComponent,
Expand Down

0 comments on commit 6e538c5

Please sign in to comment.