Skip to content

Commit

Permalink
fix(ngAria): ensure boolean values for aria-hidden
Browse files Browse the repository at this point in the history
aria-hidden should mirror the boolean representation of their ng-*
counterpart (ng-show, ng-hide) instead of their actual value

Closes angular#11365
  • Loading branch information
fredsa authored and Narretz committed May 28, 2015
1 parent 291d7c4 commit 6e1ed03
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ngAria/aria.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ function $AriaProvider() {
var ariaCamelName = attr.$normalize(ariaAttr);
if (config[ariaCamelName] && !attr[ariaCamelName]) {
scope.$watch(attr[attrName], function(boolVal) {
if (negate) {
boolVal = !boolVal;
}
// ensure boolean value
boolVal = negate ? !boolVal : !!boolVal;
elem.attr(ariaAttr, boolVal);
});
}
Expand Down

0 comments on commit 6e1ed03

Please sign in to comment.