Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 5927335

Browse files
fredsaNarretz
authored andcommitted
fix(ngAria): ensure boolean values for aria-hidden and aria-disabled
aria-hidden should mirror the boolean representation of their ng-* counterpart (ng-show, ng-hide) instead of their actual value. Same applies to aria-disabled and ng-disabled Closes #11365
1 parent f672047 commit 5927335

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ngAria/aria.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ function $AriaProvider() {
115115
var ariaCamelName = attr.$normalize(ariaAttr);
116116
if (config[ariaCamelName] && !attr[ariaCamelName]) {
117117
scope.$watch(attr[attrName], function(boolVal) {
118-
if (negate) {
119-
boolVal = !boolVal;
120-
}
118+
// ensure boolean value
119+
boolVal = negate ? !boolVal : !!boolVal;
121120
elem.attr(ariaAttr, boolVal);
122121
});
123122
}

0 commit comments

Comments
 (0)