// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
define(["dojo/_base/lang","dojo/on","dojo/_base/html","dojo/keys"],function(c,d,b,f){return{a11y_removeTabindex:function(a){b.removeAttr(a,"tabindex")},a11y_setTabindex:function(a,e){b.setAttr(a,"tabindex",e||0)},a11y_display:function(){this.a11y&&(!1===this.a11y.selectedBtn&&this.a11y_removeTabindex(this.selectedBtn),!1===this.a11y.editBtn&&this.a11y_removeTabindex(this.editBtn),!1===this.a11y.deleteBtn&&this.a11y_removeTabindex(this.deleteBtn),!1===this.a11y.renameBtn&&this.a11y_removeTabindex(this.renameBtn),
!1===this.a11y.changeImgBtn&&this.a11y_removeTabindex(this.changeImgBtn))},a11y_updateItemLabel:function(a){b.setAttr(this.domNode,"aria-label",a)},a11y_initEvents:function(){this.own(d(this.domNode,"keydown",c.hitch(this,function(a){var e=b.hasClass(a.target,"jimu-img-node");if(a.keyCode===f.ENTER&&e)this.onNodeBoxClick();this.a11y_checkFocus()})));this.own(d(this.domNode,"mouseout",c.hitch(this,function(){b.removeClass(this.domNode,"a11y_hover")})));this.own(d(this.domNode,"focus",c.hitch(this,
function(){b.addClass(this.domNode,"a11y_hover")})))},a11y_focusToLabel:function(a){setTimeout(function(){a.focus()},0)},a11y_focusToBtns:function(a){setTimeout(function(){a.focus()},0)},a11y_checkFocus:function(){setTimeout(c.hitch(this,function(){b.isDescendant(document.activeElement,this.domNode)||b.removeClass(this.domNode,"a11y_hover")}),50)}}});