var
	kind = require('enyo/kind');

/**
* @name ButtonAccessibilityMixin
* @mixin
*/
module.exports = {

	/**
	* @private
	*/
	updateAccessibilityAttributes: kind.inherit(function (sup) {
		return function () {
			var enabled = !this.accessibilityDisabled,
				id = this.$.client ? this.$.client.getId() : this.getId();
			sup.apply(this, arguments);
			this.setAttribute('aria-labelledby', enabled ? id : null);
		};
	})
};
var
	kind = require('enyo/kind');

/**
* @name ButtonAccessibilityMixin
* @mixin
*/
module.exports = {

	/**
	* @private
	*/
	updateAccessibilityAttributes: kind.inherit(function (sup) {
		return function () {
			var enabled = !this.accessibilityDisabled,
				id = this.$.client ? this.$.client.getId() : this.getId();
			sup.apply(this, arguments);
			this.setAttribute('aria-labelledby', !this.accessibilityLabel && enabled ? id : null);
		};
	})
};
Remove aria-labelledby when user adds accessibilityLabel to Button
ENYO-1912: Remove aria-labelledby when user adds accessibilityLabel to Button

https://jira2.lgsvl.com/browse/ENYO-1912
Enyo-DCO-1.1-Signed-off-by: Bongsub Kim <bongsub.kim@lgepartner.com>

Change-Id: I50a490dbd25c59e4b48a828ab5e397e07dd9d13f
