From c33ee9bd0348c5ba0a8f0d2b95d11906e5337085 Mon Sep 17 00:00:00 2001 From: Georgios Kalpakas Date: Thu, 4 Feb 2016 00:31:58 +0200 Subject: [PATCH] refactor(ngAria): remove usused dependency (As mentioned in https://github.com/angular/angular.js/commit/d06431e5309bb0125588877451dc79b935808134#commitcomment-15871053.) --- docs/content/guide/accessibility.ngdoc | 12 ++++++------ src/ngAria/aria.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/content/guide/accessibility.ngdoc b/docs/content/guide/accessibility.ngdoc index 3df8e9c69718..4dc4747c73f0 100644 --- a/docs/content/guide/accessibility.ngdoc +++ b/docs/content/guide/accessibility.ngdoc @@ -44,7 +44,7 @@ Currently, ngAria interfaces with the following directives:

ngModel

-Much of ngAria's heavy lifting happens in the {@link ng.ngModel ngModel} +Much of ngAria's heavy lifting happens in the {@link ng.directive:ngModel ngModel} directive. For elements using ngModel, special attention is paid by ngAria if that element also has a role or type of `checkbox`, `radio`, `range` or `textbox`. @@ -143,7 +143,7 @@ it with your keyboard and at least one mobile and desktop screen reader.

ngValue and ngChecked

To ease the transition between native inputs and custom controls, ngAria now supports -{@link ng.ngValue ngValue} and {@link ng.ngChecked ngChecked}. +{@link ng.directive:ngValue ngValue} and {@link ng.directive:ngChecked ngChecked}. The original directives were created for native inputs only, so ngAria extends support to custom elements by managing `aria-checked` for accessibility. @@ -165,7 +165,7 @@ Becomes: The `disabled` attribute is only valid for certain elements such as `button`, `input` and `textarea`. To properly disable custom element directives such as `` or ``, -using ngAria with {@link ng.ngDisabled ngDisabled} will also +using ngAria with {@link ng.directive:ngDisabled ngDisabled} will also add `aria-disabled`. This tells assistive technologies when a non-native input is disabled, helping custom controls to be more accessible. @@ -188,7 +188,7 @@ Becomes: The boolean `required` attribute is only valid for native form controls such as `input` and `textarea`. To properly indicate custom element directives such as `` or `` -as required, using ngAria with {@link ng.ngRequired ngRequired} will also add +as required, using ngAria with {@link ng.directive:ngRequired ngRequired} will also add `aria-required`. This tells accessibility APIs when a custom control is required. ###Example @@ -205,7 +205,7 @@ Becomes:

ngShow

->The {@link ng.ngShow ngShow} directive shows or hides the +>The {@link ng.directive:ngShow ngShow} directive shows or hides the given HTML element based on the expression provided to the `ngShow` attribute. The element is shown or hidden by removing or adding the `.ng-hide` CSS class onto the element. @@ -242,7 +242,7 @@ Becomes:

ngHide

->The {@link ng.ngHide ngHide} directive shows or hides the +>The {@link ng.directive:ngHide ngHide} directive shows or hides the given HTML element based on the expression provided to the `ngHide` attribute. The element is shown or hidden by removing or adding the `.ng-hide` CSS class onto the element. diff --git a/src/ngAria/aria.js b/src/ngAria/aria.js index 18ee959ae85d..400d951e2bc0 100644 --- a/src/ngAria/aria.js +++ b/src/ngAria/aria.js @@ -212,7 +212,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) { .directive('ngRequired', ['$aria', function($aria) { return $aria.$$watchExpr('ngRequired', 'aria-required', nodeBlackList, false); }]) -.directive('ngModel', ['$aria', '$parse', function($aria, $parse) { +.directive('ngModel', ['$aria', function($aria) { function shouldAttachAttr(attr, normalizedAttr, elem, allowBlacklistEls) { return $aria.config(normalizedAttr) && !elem.attr(attr) && (allowBlacklistEls || !isNodeOneOf(elem, nodeBlackList));