66import { FocusKeyManager } from '@angular/cdk/a11y' ;
77import { Direction , Directionality } from '@angular/cdk/bidi' ;
88import { coerceNumberProperty } from '@angular/cdk/coercion' ;
9- import { DOWN_ARROW , ENTER , LEFT_ARROW , RIGHT_ARROW , SPACE , UP_ARROW , hasModifierKey } from '@angular/cdk/keycodes' ;
9+ import { DOWN_ARROW , ENTER , hasModifierKey , LEFT_ARROW , RIGHT_ARROW , SPACE , UP_ARROW } from '@angular/cdk/keycodes' ;
1010import { ViewportRuler } from '@angular/cdk/overlay' ;
1111import { NgIf , NgTemplateOutlet } from '@angular/common' ;
1212import {
@@ -30,7 +30,7 @@ import {
3030 ViewChild ,
3131 ViewEncapsulation
3232} from '@angular/core' ;
33- import { Subject , animationFrameScheduler , asapScheduler , merge , of } from 'rxjs' ;
33+ import { animationFrameScheduler , asapScheduler , merge , of , Subject } from 'rxjs' ;
3434import { auditTime , takeUntil } from 'rxjs/operators' ;
3535
3636import { NzResizeObserver } from 'ng-zorro-antd/cdk/resize-observer' ;
@@ -68,9 +68,17 @@ const CSS_TRANSFORM_TIME = 150;
6868 nzTabScrollList
6969 (offsetChange)="onOffsetChange($event)"
7070 (tabScroll)="tabScroll.emit($event)"
71+ role="tablist"
7172 >
7273 <ng-content></ng-content>
73- <button *ngIf="showAddButton" nz-tab-add-button [addIcon]="addIcon" (click)="addClicked.emit()"></button>
74+ <button
75+ role="tab"
76+ [attr.tabindex]="-1"
77+ *ngIf="showAddButton"
78+ nz-tab-add-button
79+ [addIcon]="addIcon"
80+ (click)="addClicked.emit()"
81+ ></button>
7482 <div nz-tabs-ink-bar [hidden]="hideBar" [position]="position" [animated]="inkBarAnimated"></div>
7583 </div>
7684 </div>
@@ -86,7 +94,6 @@ const CSS_TRANSFORM_TIME = 150;
8694 </div>
8795 ` ,
8896 host : {
89- role : 'tablist' ,
9097 class : 'ant-tabs-nav' ,
9198 '(keydown)' : 'handleKeydown($event)'
9299 } ,
0 commit comments