ngAria module applies aria-disabled attribute to element when non-explicit false value is present #11998
Description
Using Angular 1.4.0 - It appears that ngAria causes the ngDisabled directive to apply aria-disabled="value"
even when the ng-disabled expression is not explicitly returning TRUE.
I discovered this when I was using an OR based expression like the following:
<button data-ng-disabled="formNotReadyForProcessing() || formRequestProcessing">Continue</button>
I found that while ngDisabled properly applies or unapplies the disabled="disabled"
attribute to the button when this expression did not return an explicit TRUE value, ngAria did not unapply the aria-disabled attribute when the expression did not return an explicit TRUE value (returning undefined).
> var scope = {};
> scope.a = false;
> scope.a || scope.b;
< undefined
Here is a jsFiddle example.
It seems that in my "Undefined Example" you can see that 'undefined' perhaps gets converted to TRUE when assigned to the scope via ngModel.
I'm not completely sure what is causing that, as the "Simple Example" you see it's applying aria-disabled="undefined"
. I'm not sure if this is what it's receiving from $scope.undefined, or if it's evaluating the 'undefined' in the attribute as a string or as an actual undefined value.