Skip to content

Commit a460ce4

Browse files
committed
refactor(ngAria): remove redundant '?' in DDO's require
It also fixes some dangling links in Accessibility guide.
1 parent d06431e commit a460ce4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/content/guide/accessibility.ngdoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Currently, ngAria interfaces with the following directives:
4444

4545
<h2 id="ngmodel">ngModel</h2>
4646

47-
Much of ngAria's heavy lifting happens in the {@link ng/directive/ngModel}
47+
Much of ngAria's heavy lifting happens in the {@link ng.ngModel ngModel}
4848
directive. For elements using ngModel, special attention is paid by ngAria if that element also
4949
has a role or type of `checkbox`, `radio`, `range` or `textbox`.
5050

@@ -143,7 +143,7 @@ it with your keyboard and at least one mobile and desktop screen reader.
143143
<h2 id="ngvaluechecked">ngValue and ngChecked</h2>
144144

145145
To ease the transition between native inputs and custom controls, ngAria now supports
146-
{@link ng/directive/ngValue ngValue} and {@link ng/directive/ngChecked ngChecked}.
146+
{@link ng.ngValue ngValue} and {@link ng.ngChecked ngChecked}.
147147
The original directives were created for native inputs only, so ngAria extends
148148
support to custom elements by managing `aria-checked` for accessibility.
149149

@@ -165,7 +165,7 @@ Becomes:
165165

166166
The `disabled` attribute is only valid for certain elements such as `button`, `input` and
167167
`textarea`. To properly disable custom element directives such as `<md-checkbox>` or `<taco-tab>`,
168-
using ngAria with {@link ng/directive/ngDisabled} will also
168+
using ngAria with {@link ng.ngDisabled ngDisabled} will also
169169
add `aria-disabled`. This tells assistive technologies when a non-native input is disabled, helping
170170
custom controls to be more accessible.
171171

@@ -188,7 +188,7 @@ Becomes:
188188

189189
The boolean `required` attribute is only valid for native form controls such as `input` and
190190
`textarea`. To properly indicate custom element directives such as `<md-checkbox>` or `<custom-input>`
191-
as required, using ngAria with {@link ng/directive/ngRequired ngRequired} will also add
191+
as required, using ngAria with {@link ng.ngRequired ngRequired} will also add
192192
`aria-required`. This tells accessibility APIs when a custom control is required.
193193

194194
###Example
@@ -205,7 +205,7 @@ Becomes:
205205

206206
<h2 id="ngshow">ngShow</h2>
207207

208-
>The {@link ng/directive/ngShow} directive shows or hides the
208+
>The {@link ng.ngShow ngShow} directive shows or hides the
209209
given HTML element based on the expression provided to the `ngShow` attribute. The element is
210210
shown or hidden by removing or adding the `.ng-hide` CSS class onto the element.
211211

@@ -242,7 +242,7 @@ Becomes:
242242

243243
<h2 id="nghide">ngHide</h2>
244244

245-
>The {@link ng/directive/ngHide} directive shows or hides the
245+
>The {@link ng.ngHide ngHide} directive shows or hides the
246246
given HTML element based on the expression provided to the `ngHide` attribute. The element is
247247
shown or hidden by removing or adding the `.ng-hide` CSS class onto the element.
248248

src/ngAria/aria.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
236236

237237
return {
238238
restrict: 'A',
239-
require: '?ngModel',
239+
require: 'ngModel',
240240
priority: 200, //Make sure watches are fired after any other directives that affect the ngModel value
241241
compile: function(elem, attr) {
242242
var shape = getShape(attr, elem);

test/ngAria/ariaSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ describe('$aria', function() {
404404
expect(element.attr('aria-required')).toBeUndefined();
405405
});
406406

407-
it('should attach to custom controls with ngModel and required', function() {
407+
it('should attach to custom controls with ngModel and required', function() {
408408
compileElement('<div ng-model="val" role="checkbox" required></div>');
409409
expect(element.attr('aria-required')).toBe('true');
410410
});

0 commit comments

Comments
 (0)