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

Commit 7cd7aaa

Browse files
committed
v1.8.4-local+sha.d8f77817e
1 parent a8ee0af commit 7cd7aaa

File tree

501 files changed

+29959
-4171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

501 files changed

+29959
-4171
lines changed

snapshot/angular-animate.js

Lines changed: 191 additions & 98 deletions
Large diffs are not rendered by default.

snapshot/angular-animate.min.js

Lines changed: 55 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

snapshot/angular-animate.min.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

snapshot/angular-aria.js

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* @license AngularJS v1.7.2-build.5558+sha.c9a92fc
3-
* (c) 2010-2018 Google, Inc. http://angularjs.org
2+
* @license AngularJS v1.8.4-local+sha.d8f77817e
3+
* (c) 2010-2020 Google LLC. http://angularjs.org
44
* License: MIT
55
*/
66
(function(window, angular) {'use strict';
@@ -63,13 +63,13 @@
6363
var ARIA_DISABLE_ATTR = 'ngAriaDisable';
6464

6565
var ngAriaModule = angular.module('ngAria', ['ng']).
66-
info({ angularVersion: '1.7.2-build.5558+sha.c9a92fc' }).
66+
info({ angularVersion: '1.8.4-local+sha.d8f77817e' }).
6767
provider('$aria', $AriaProvider);
6868

6969
/**
7070
* Internal Utilities
7171
*/
72-
var nodeBlackList = ['BUTTON', 'A', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS', 'SUMMARY'];
72+
var nativeAriaNodeNames = ['BUTTON', 'A', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS', 'SUMMARY'];
7373

7474
var isNodeOneOf = function(elem, nodeTypeArray) {
7575
if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) {
@@ -141,12 +141,12 @@ function $AriaProvider() {
141141
config = angular.extend(config, newConfig);
142142
};
143143

144-
function watchExpr(attrName, ariaAttr, nodeBlackList, negate) {
144+
function watchExpr(attrName, ariaAttr, nativeAriaNodeNames, negate) {
145145
return function(scope, elem, attr) {
146146
if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return;
147147

148148
var ariaCamelName = attr.$normalize(ariaAttr);
149-
if (config[ariaCamelName] && !isNodeOneOf(elem, nodeBlackList) && !attr[ariaCamelName]) {
149+
if (config[ariaCamelName] && !isNodeOneOf(elem, nativeAriaNodeNames) && !attr[ariaCamelName]) {
150150
scope.$watch(attr[attrName], function(boolVal) {
151151
// ensure boolean value
152152
boolVal = negate ? !boolVal : !!boolVal;
@@ -160,7 +160,6 @@ function $AriaProvider() {
160160
* @name $aria
161161
*
162162
* @description
163-
* @priority 200
164163
*
165164
* The $aria service contains helper methods for applying common
166165
* [ARIA](http://www.w3.org/TR/wai-aria/) attributes to HTML directives.
@@ -171,7 +170,7 @@ function $AriaProvider() {
171170
*
172171
*```js
173172
* ngAriaModule.directive('ngDisabled', ['$aria', function($aria) {
174-
* return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nodeBlackList, false);
173+
* return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nativeAriaNodeNames, false);
175174
* }])
176175
*```
177176
* Shown above, the ngAria module creates a directive with the same signature as the
@@ -223,31 +222,31 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
223222
return $aria.$$watchExpr('ngHide', 'aria-hidden', [], false);
224223
}])
225224
.directive('ngValue', ['$aria', function($aria) {
226-
return $aria.$$watchExpr('ngValue', 'aria-checked', nodeBlackList, false);
225+
return $aria.$$watchExpr('ngValue', 'aria-checked', nativeAriaNodeNames, false);
227226
}])
228227
.directive('ngChecked', ['$aria', function($aria) {
229-
return $aria.$$watchExpr('ngChecked', 'aria-checked', nodeBlackList, false);
228+
return $aria.$$watchExpr('ngChecked', 'aria-checked', nativeAriaNodeNames, false);
230229
}])
231230
.directive('ngReadonly', ['$aria', function($aria) {
232-
return $aria.$$watchExpr('ngReadonly', 'aria-readonly', nodeBlackList, false);
231+
return $aria.$$watchExpr('ngReadonly', 'aria-readonly', nativeAriaNodeNames, false);
233232
}])
234233
.directive('ngRequired', ['$aria', function($aria) {
235-
return $aria.$$watchExpr('ngRequired', 'aria-required', nodeBlackList, false);
234+
return $aria.$$watchExpr('ngRequired', 'aria-required', nativeAriaNodeNames, false);
236235
}])
237236
.directive('ngModel', ['$aria', function($aria) {
238237

239-
function shouldAttachAttr(attr, normalizedAttr, elem, allowBlacklistEls) {
238+
function shouldAttachAttr(attr, normalizedAttr, elem, allowNonAriaNodes) {
240239
return $aria.config(normalizedAttr) &&
241240
!elem.attr(attr) &&
242-
(allowBlacklistEls || !isNodeOneOf(elem, nodeBlackList)) &&
241+
(allowNonAriaNodes || !isNodeOneOf(elem, nativeAriaNodeNames)) &&
243242
(elem.attr('type') !== 'hidden' || elem[0].nodeName !== 'INPUT');
244243
}
245244

246245
function shouldAttachRole(role, elem) {
247246
// if element does not have role attribute
248247
// AND element type is equal to role (if custom element has a type equaling shape) <-- remove?
249-
// AND element is not in nodeBlackList
250-
return !elem.attr('role') && (elem.attr('type') === role) && !isNodeOneOf(elem, nodeBlackList);
248+
// AND element is not in nativeAriaNodeNames
249+
return !elem.attr('role') && (elem.attr('type') === role) && !isNodeOneOf(elem, nativeAriaNodeNames);
251250
}
252251

253252
function getShape(attr, elem) {
@@ -355,7 +354,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
355354
};
356355
}])
357356
.directive('ngDisabled', ['$aria', function($aria) {
358-
return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nodeBlackList, false);
357+
return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nativeAriaNodeNames, false);
359358
}])
360359
.directive('ngMessages', function() {
361360
return {
@@ -379,7 +378,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
379378
var fn = $parse(attr.ngClick);
380379
return function(scope, elem, attr) {
381380

382-
if (!isNodeOneOf(elem, nodeBlackList)) {
381+
if (!isNodeOneOf(elem, nativeAriaNodeNames)) {
383382

384383
if ($aria.config('bindRoleForClick') && !elem.attr('role')) {
385384
elem.attr('role', 'button');
@@ -392,7 +391,14 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
392391
if ($aria.config('bindKeydown') && !attr.ngKeydown && !attr.ngKeypress && !attr.ngKeyup) {
393392
elem.on('keydown', function(event) {
394393
var keyCode = event.which || event.keyCode;
395-
if (keyCode === 32 || keyCode === 13) {
394+
395+
if (keyCode === 13 || keyCode === 32) {
396+
// If the event is triggered on a non-interactive element ...
397+
if (nativeAriaNodeNames.indexOf(event.target.nodeName) === -1 && !event.target.isContentEditable) {
398+
// ... prevent the default browser behavior (e.g. scrolling when pressing spacebar)
399+
// See https://github.com/angular/angular.js/issues/16664
400+
event.preventDefault();
401+
}
396402
scope.$apply(callback);
397403
}
398404

@@ -410,7 +416,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
410416
return function(scope, elem, attr) {
411417
if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return;
412418

413-
if ($aria.config('tabindex') && !elem.attr('tabindex') && !isNodeOneOf(elem, nodeBlackList)) {
419+
if ($aria.config('tabindex') && !elem.attr('tabindex') && !isNodeOneOf(elem, nativeAriaNodeNames)) {
414420
elem.attr('tabindex', 0);
415421
}
416422
};

snapshot/angular-aria.min.js

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)