Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: (CXSPA-9018) - Fix extra reading issue when tab-panel is focused in 'Delivery method' #19920

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div
[attr.role]="mode === TAB_MODE.ACCORDIAN ? 'region' : 'tabpanel'"
[tabindex]="tab.disableBorderFocus ? -1 : 0"
[attr.aria-labelledby]="tab.id ?? null"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's roll back this line

[attr.id]="
tab.id !== null && tab.id !== undefined ? 'section-' + tab.id : null
"
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets roll back this :)

});

it('should have correct attribues when is open in ACCORDIAN mode', () => {
Expand All @@ -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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this :)

});

it('should have correct attribues when disableBorderFocus is active', () => {
Expand Down