diff --git a/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.html b/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.html index 474edec909c..7b37265a65a 100644 --- a/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.html +++ b/feature-libs/cart/base/components/cart-shared/cart-item-list/cart-item-list.component.html @@ -6,7 +6,7 @@ </caption> <thead *ngIf="hasHeader"> <tr role="row" class="cx-item-list-header"> - <th role="columnheader" class="cx-item-list-desc"> + <th role="columnheader" scope="col" class="cx-item-list-desc"> {{ 'cartItems.item' | cxTranslate }} </th> @@ -18,6 +18,7 @@ <th *cxFeature="'a11yQTY2Quantity'" role="columnheader" + scope="col" class="cx-item-list-qty" > {{ 'cartItems.quantityFull' | cxTranslate }} @@ -25,19 +26,20 @@ <th *cxFeature="'!a11yQTY2Quantity'" role="columnheader" + scope="col" class="cx-item-list-qty" > {{ 'cartItems.quantity' | cxTranslate }} </th> <ng-container *ngIf="options.isSaveForLater; else totalHeader"> - <th role="columnheader" class="cx-item-list-total"> + <th role="columnheader" scope="col" class="cx-item-list-total"> {{ 'saveForLaterItems.stock' | cxTranslate }} </th> </ng-container> <ng-container *ngIf="!readonly || options.isSaveForLater || options.displayAddToCart" > - <th role="columnheader" class="cx-item-list-actions"> + <th role="columnheader" scope="col" class="cx-item-list-actions"> {{ 'cartItems.actions' | cxTranslate }} </th> </ng-container> @@ -58,6 +60,7 @@ [readonly]="readonly" [promotionLocation]="promotionLocation" [options]="options" + [attr.aria-rowindex]="i + 1" ></tr> </ng-container> </ng-container> @@ -65,7 +68,7 @@ </table> <ng-template #totalHeader> - <th role="columnheader" class="cx-item-list-total"> + <th role="columnheader" scope="col" class="cx-item-list-total"> {{ 'cartItems.total' | cxTranslate }} </th> </ng-template> diff --git a/projects/storefrontlib/cms-components/content/tab/panel/tab-panel.component.html b/projects/storefrontlib/cms-components/content/tab/panel/tab-panel.component.html index 7c9f1026c48..1e17a8eeac8 100644 --- a/projects/storefrontlib/cms-components/content/tab/panel/tab-panel.component.html +++ b/projects/storefrontlib/cms-components/content/tab/panel/tab-panel.component.html @@ -1,7 +1,6 @@ <div [attr.role]="mode === TAB_MODE.ACCORDIAN ? 'region' : 'tabpanel'" [tabindex]="tab.disableBorderFocus ? -1 : 0" - [attr.aria-labelledby]="tab.id ?? null" [attr.id]=" tab.id !== null && tab.id !== undefined ? 'section-' + tab.id : null " diff --git a/projects/storefrontlib/cms-components/content/tab/panel/tab-panel.component.spec.ts b/projects/storefrontlib/cms-components/content/tab/panel/tab-panel.component.spec.ts index 2c7278a6c6b..36844478ba3 100644 --- a/projects/storefrontlib/cms-components/content/tab/panel/tab-panel.component.spec.ts +++ b/projects/storefrontlib/cms-components/content/tab/panel/tab-panel.component.spec.ts @@ -1,8 +1,8 @@ import { Component, TemplateRef, ViewChild } from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { Tab, TAB_MODE } from '../tab.model'; -import { TabPanelComponent } from './tab-panel.component'; import { KeyboardFocusTestingModule } from '@spartacus/storefront'; +import { TAB_MODE, Tab } from '../tab.model'; +import { TabPanelComponent } from './tab-panel.component'; const mockTab: Tab | any = { id: 1, @@ -46,7 +46,6 @@ describe('TabPanelComponent', () => { expect(tabPanel?.getAttribute('tabindex')).toEqual('0'); expect(tabPanel?.getAttribute('role')).toEqual('tabpanel'); expect(tabPanel?.getAttribute('class')).toEqual('active'); - expect(tabPanel?.getAttribute('aria-labelledby')).toEqual('1'); }); it('should have correct attribues when is open in ACCORDIAN mode', () => { @@ -58,7 +57,6 @@ describe('TabPanelComponent', () => { expect(tabPanel?.getAttribute('tabindex')).toEqual('0'); expect(tabPanel?.getAttribute('role')).toEqual('region'); expect(tabPanel?.getAttribute('class')).toEqual('active'); - expect(tabPanel?.getAttribute('aria-labelledby')).toEqual('1'); }); it('should have correct attribues when disableBorderFocus is active', () => {