@@ -36,7 +36,6 @@ import {
36
36
afterNextRender ,
37
37
booleanAttribute ,
38
38
inject ,
39
- numberAttribute ,
40
39
} from '@angular/core' ;
41
40
import {
42
41
MAT_RIPPLE_GLOBAL_OPTIONS ,
@@ -85,7 +84,6 @@ export interface MatChipEvent {
85
84
'[class._mat-animation-noopable]' : '_animationsDisabled' ,
86
85
'[id]' : 'id' ,
87
86
'[attr.role]' : 'role' ,
88
- '[attr.tabindex]' : '_getTabIndex()' ,
89
87
'[attr.aria-label]' : 'ariaLabel' ,
90
88
'[attr.aria-hidden]' : 'true' ,
91
89
'(keydown)' : '_handleKeydown($event)' ,
@@ -202,12 +200,6 @@ export class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoCheck
202
200
@Input ( { transform : booleanAttribute } )
203
201
disabled : boolean = false ;
204
202
205
- /** Tab index of the chip. */
206
- @Input ( {
207
- transform : ( value : unknown ) => ( value == null ? undefined : numberAttribute ( value ) ) ,
208
- } )
209
- tabIndex : number = - 1 ;
210
-
211
203
/** Emitted when a chip is to be removed. */
212
204
@Output ( ) readonly removed : EventEmitter < MatChipEvent > = new EventEmitter < MatChipEvent > ( ) ;
213
205
@@ -259,13 +251,9 @@ export class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoCheck
259
251
@Optional ( )
260
252
@Inject ( MAT_RIPPLE_GLOBAL_OPTIONS )
261
253
private _globalRippleOptions ?: RippleGlobalOptions ,
262
- @Attribute ( 'tabindex' ) tabIndex ?: string ,
263
254
) {
264
255
this . _document = _document ;
265
256
this . _animationsDisabled = animationMode === 'NoopAnimations' ;
266
- if ( tabIndex != null ) {
267
- this . tabIndex = parseInt ( tabIndex ) ?? - 1 ;
268
- }
269
257
this . _monitorFocus ( ) ;
270
258
271
259
this . _rippleLoader ?. configureRipple ( this . _elementRef . nativeElement , {
@@ -397,14 +385,6 @@ export class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoCheck
397
385
// Empty here, but is overwritten in child classes.
398
386
}
399
387
400
- /** Gets the tabindex of the chip. */
401
- _getTabIndex ( ) {
402
- if ( ! this . role ) {
403
- return null ;
404
- }
405
- return this . disabled ? - 1 : this . tabIndex ;
406
- }
407
-
408
388
/** Starts the focus monitoring process on the chip. */
409
389
private _monitorFocus ( ) {
410
390
this . _focusMonitor . monitor ( this . _elementRef , true ) . subscribe ( origin => {
0 commit comments