@@ -34,10 +34,12 @@ import {
34
34
CanColor ,
35
35
CanDisable ,
36
36
CanDisableRipple ,
37
+ HasTabIndex ,
37
38
MatRipple ,
38
39
mixinColor ,
39
40
mixinDisabled ,
40
41
mixinDisableRipple ,
42
+ mixinTabIndex ,
41
43
RippleConfig ,
42
44
RippleRef ,
43
45
} from '@angular/material/core' ;
@@ -313,12 +315,17 @@ export class MatRadioGroup extends _MatRadioGroupMixinBase
313
315
// Boilerplate for applying mixins to MatRadioButton.
314
316
/** @docs -private */
315
317
export class MatRadioButtonBase {
318
+ // Since the disabled property is manually defined for the MatRadioButton and isn't set up in
319
+ // the mixin base class. To be able to use the tabindex mixin, a disabled property must be
320
+ // defined to properly work.
321
+ disabled : boolean ;
322
+
316
323
constructor ( public _elementRef : ElementRef ) { }
317
324
}
318
325
// As per Material design specifications the selection control radio should use the accent color
319
326
// palette by default. https://material.io/guidelines/components/selection-controls.html
320
327
export const _MatRadioButtonMixinBase =
321
- mixinColor ( mixinDisableRipple ( MatRadioButtonBase ) , 'accent' ) ;
328
+ mixinColor ( mixinDisableRipple ( mixinTabIndex ( MatRadioButtonBase ) ) , 'accent' ) ;
322
329
323
330
/**
324
331
* A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.
@@ -328,7 +335,7 @@ export const _MatRadioButtonMixinBase =
328
335
selector : 'mat-radio-button' ,
329
336
templateUrl : 'radio.html' ,
330
337
styleUrls : [ 'radio.css' ] ,
331
- inputs : [ 'color' , 'disableRipple' ] ,
338
+ inputs : [ 'color' , 'disableRipple' , 'tabIndex' ] ,
332
339
encapsulation : ViewEncapsulation . None ,
333
340
preserveWhitespaces : false ,
334
341
exportAs : 'matRadioButton' ,
@@ -345,7 +352,7 @@ export const _MatRadioButtonMixinBase =
345
352
changeDetection : ChangeDetectionStrategy . OnPush ,
346
353
} )
347
354
export class MatRadioButton extends _MatRadioButtonMixinBase
348
- implements OnInit , AfterViewInit , OnDestroy , CanColor , CanDisableRipple {
355
+ implements OnInit , AfterViewInit , OnDestroy , CanColor , CanDisableRipple , HasTabIndex {
349
356
350
357
private _uniqueId : string = `mat-radio-${ ++ nextUniqueId } ` ;
351
358
0 commit comments