Skip to content

Commit

Permalink
Merge pull request #725 from CameronAM/master
Browse files Browse the repository at this point in the history
fix(globals.js): added aria-hidden to hidden input, to hide it from screen readers
  • Loading branch information
JoelParke committed Jul 8, 2015
2 parents 0e8249f + 91a9784 commit b49bf81
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/globals.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

// IE version detection - http://stackoverflow.com/questions/4169160/javascript-ie-detection-why-not-use-simple-conditional-comments
// We need this as IE sometimes plays funny tricks with the contenteditable.
// ----------------------------------------------------------
Expand All @@ -20,12 +20,12 @@ var _browserDetect = {
v = 3,
div = document.createElement('div'),
all = div.getElementsByTagName('i');

while (
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
all[0]
);

return v > 4 ? v : undef;
}()),
webkit: /AppleWebKit\/([\d.]+)/i.test(navigator.userAgent)
Expand Down Expand Up @@ -53,11 +53,11 @@ if(_browserDetect.webkit) {
curelement.select(); // use select to place cursor for input elements.
}
}
}
}
globalContentEditableBlur = false;
}, false); // add global click handler
angular.element(document).ready(function () {
angular.element(document.body).append(angular.element('<input id="textAngular-editableFix-010203040506070809" class="ta-hidden-input" unselectable="on" tabIndex="-1">'));
angular.element(document.body).append(angular.element('<input id="textAngular-editableFix-010203040506070809" class="ta-hidden-input" aria-hidden="true" unselectable="on" tabIndex="-1">'));
});
}

Expand Down Expand Up @@ -130,7 +130,7 @@ if(_browserDetect.ie > 8 || _browserDetect.ie === undefined){
/* istanbul ignore next: browser catches */
if(_sheet.cssRules) insertIndex = Math.max(_sheet.cssRules.length - 1, 0);
else if(_sheet.rules) insertIndex = Math.max(_sheet.rules.length - 1, 0);

/* istanbul ignore else: untestable IE option */
if(_sheet.insertRule) {
_sheet.insertRule(selector + "{" + rules + "}", insertIndex);
Expand Down Expand Up @@ -171,4 +171,4 @@ if(_browserDetect.ie > 8 || _browserDetect.ie === undefined){
sheet.deleteRule(ruleIndex);
}
};
}
}

0 comments on commit b49bf81

Please sign in to comment.