@@ -34,10 +34,12 @@ import {
3434 CanColor ,
3535 CanDisable ,
3636 CanDisableRipple ,
37+ HasTabIndex ,
3738 MatRipple ,
3839 mixinColor ,
3940 mixinDisabled ,
4041 mixinDisableRipple ,
42+ mixinTabIndex ,
4143 RippleConfig ,
4244 RippleRef ,
4345} from '@angular/material/core' ;
@@ -313,12 +315,17 @@ export class MatRadioGroup extends _MatRadioGroupMixinBase
313315// Boilerplate for applying mixins to MatRadioButton.
314316/** @docs -private */
315317export 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+
316323 constructor ( public _elementRef : ElementRef ) { }
317324}
318325// As per Material design specifications the selection control radio should use the accent color
319326// palette by default. https://material.io/guidelines/components/selection-controls.html
320327export const _MatRadioButtonMixinBase =
321- mixinColor ( mixinDisableRipple ( MatRadioButtonBase ) , 'accent' ) ;
328+ mixinColor ( mixinDisableRipple ( mixinTabIndex ( MatRadioButtonBase ) ) , 'accent' ) ;
322329
323330/**
324331 * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.
@@ -328,7 +335,7 @@ export const _MatRadioButtonMixinBase =
328335 selector : 'mat-radio-button' ,
329336 templateUrl : 'radio.html' ,
330337 styleUrls : [ 'radio.css' ] ,
331- inputs : [ 'color' , 'disableRipple' ] ,
338+ inputs : [ 'color' , 'disableRipple' , 'tabIndex' ] ,
332339 encapsulation : ViewEncapsulation . None ,
333340 preserveWhitespaces : false ,
334341 exportAs : 'matRadioButton' ,
@@ -345,7 +352,7 @@ export const _MatRadioButtonMixinBase =
345352 changeDetection : ChangeDetectionStrategy . OnPush ,
346353} )
347354export class MatRadioButton extends _MatRadioButtonMixinBase
348- implements OnInit , AfterViewInit , OnDestroy , CanColor , CanDisableRipple {
355+ implements OnInit , AfterViewInit , OnDestroy , CanColor , CanDisableRipple , HasTabIndex {
349356
350357 private _uniqueId : string = `mat-radio-${ ++ nextUniqueId } ` ;
351358
0 commit comments