facebook-workplaceoutlookemailmicrosoft-teamsdiscordmessengercustom-servicesmacoslinuxwindowsinboxwhatsappicloudtweetdeckhipchattelegramhangoutsslackgmailskype
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.0 KiB
50 lines
1.0 KiB
9 years ago
|
/** */
|
||
|
Ext.define('Ext.aria.menu.Item', {
|
||
|
override: 'Ext.menu.Item',
|
||
|
|
||
|
ariaGetRenderAttributes: function() {
|
||
|
var me = this,
|
||
|
attrs;
|
||
|
|
||
|
attrs = me.callParent();
|
||
|
|
||
|
if (me.menu) {
|
||
|
attrs['aria-haspopup'] = true;
|
||
|
}
|
||
|
|
||
|
return attrs;
|
||
|
},
|
||
|
|
||
|
ariaGetAfterRenderAttributes: function() {
|
||
|
var me = this,
|
||
|
menu = me.menu,
|
||
|
attrs;
|
||
|
|
||
|
attrs = me.callParent();
|
||
|
|
||
|
if (menu && menu.rendered) {
|
||
|
attrs['aria-controls'] = menu.ariaGetEl().id;
|
||
|
}
|
||
|
|
||
|
if (me.plain) {
|
||
|
attrs['aria-label'] = me.text;
|
||
|
}
|
||
|
else {
|
||
|
attrs['aria-labelledby'] = me.textEl.id;
|
||
|
}
|
||
|
|
||
|
return attrs;
|
||
|
},
|
||
|
|
||
|
doExpandMenu: function() {
|
||
|
var me = this,
|
||
|
menu = me.menu;
|
||
|
|
||
|
me.callParent();
|
||
|
|
||
|
if (menu && menu.rendered) {
|
||
|
me.ariaUpdate({ 'aria-controls': menu.ariaGetEl().id });
|
||
|
}
|
||
|
}
|
||
|
});
|