fix(radio/checkbox/toggle): fix the tab index attribute so you can tab to them

references #745
This commit is contained in:
Brandy Carney
2015-12-18 13:15:38 -05:00
parent 8b35fae3bd
commit 80b2579609
3 changed files with 5 additions and 3 deletions

View File

@ -34,7 +34,7 @@ import {Form} from '../../util/form';
'role': 'checkbox',
'tappable': 'true',
'[attr.id]': 'id',
'[attr.tab-index]': 'tabIndex',
'[tabindex]': 'tabIndex',
'[attr.aria-checked]': 'checked',
'[attr.aria-disabled]': 'disabled',
'[attr.aria-labelledby]': 'labelId',
@ -64,6 +64,7 @@ export class Checkbox {
this.onChange = (_) => {};
this.onTouched = (_) => {};
this.tabIndex = 0;
this.ngControl = ngControl;
if (ngControl) ngControl.valueAccessor = this;