fix(all): hostData() attributes

This commit is contained in:
Manu Mtz.-Almeida
2017-10-26 14:53:06 +02:00
parent 059a1330d9
commit 4716823e79
6 changed files with 16 additions and 32 deletions

View File

@ -165,11 +165,9 @@ export class Menu {
hostData() {
return {
attrs: {
'role': 'navigation',
'side': this.getSide(),
'type': this.type
},
'role': 'navigation',
'side': this.getSide(),
'type': this.type,
class: {
'menu-enabled': this._canOpen()
}

View File

@ -169,11 +169,9 @@ export class RadioGroup {
hostData() {
return {
attrs: {
'role': 'radiogroup',
'aria-activedescendant': this.activeId,
'aria-describedby': this.headerId
}
'role': 'radiogroup',
'aria-activedescendant': this.activeId,
'aria-describedby': this.headerId
};
}

View File

@ -45,15 +45,13 @@ export class RangeKnob {
style: {
'left': this.leftPos(this.ratio)
},
attrs: {
'role': 'slider',
'tabindex': this.disabled ? -1 : 0,
'aria-valuemin': this.min,
'aria-valuemax': this.max,
'aria-disabled': this.disabled,
'aria-labelledby': this.labelId,
'aria-valuenow': this.val
}
'role': 'slider',
'tabindex': this.disabled ? -1 : 0,
'aria-valuemin': this.min,
'aria-valuemax': this.max,
'aria-disabled': this.disabled,
'aria-labelledby': this.labelId,
'aria-valuenow': this.val
};
}

View File

@ -23,9 +23,7 @@ export class TabBar {
hostData() {
return {
attrs: {
'role': 'tablist'
},
'role': 'tablist'
class: {
'tabbar': true
}

View File

@ -33,9 +33,7 @@ export class TabButton {
// class.tab-hidden
return {
attrs: {
'aria-selected': this.selectedIndex === this.index
},
'aria-selected': this.selectedIndex === this.index,
class: {
'has-title': hasTitle,
'has-icon': hasIcon,

View File

@ -74,13 +74,7 @@ export class Tab {
style: {
display: !this.isSelected && 'none' || ''
},
attrs: {
'role': 'tabpanel'
// 'id': _tabId,
// aria-labelledby: _btnId
},
class: {
}
'role': 'tabpanel'
};
}