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() { hostData() {
return { return {
attrs: { 'role': 'navigation',
'role': 'navigation', 'side': this.getSide(),
'side': this.getSide(), 'type': this.type,
'type': this.type
},
class: { class: {
'menu-enabled': this._canOpen() 'menu-enabled': this._canOpen()
} }

View File

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

View File

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

View File

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

View File

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

View File

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