This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 1 file changed +40
-0
lines changed
1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ @ngdoc overview
2
+ @name Accessibility
3
+ @description
4
+
5
+
6
+ # Accessibility with ngAria
7
+
8
+ You can use the `ngAria` module to have certain ARIA attributes automatically applied when you
9
+ use certain directives.
10
+
11
+ ```js
12
+ angular.module('myApp', ['ngAria'])...
13
+ ```
14
+
15
+ Elements using `ng-model` with `required` or `ngRequired` directives will automatically have
16
+ `aria-required` attributes with the proper corresponding values.
17
+
18
+ ```html
19
+ <material-input ng-model="val" required>
20
+ ```
21
+
22
+ Becomes:
23
+
24
+ ```html
25
+ <material-input ng-model="val" required aria-required="true">
26
+ ```
27
+
28
+ ngAria is just a starting point. You'll have to manually choose how to implement some
29
+ accessibility features.
30
+
31
+ For instance, you may want to add `ng-keypress` bindings alongside `ng-click` to make keyboard
32
+ navigation easier.
33
+
34
+
35
+ ## Additional Resources
36
+
37
+ Accessibility best practices that apply to web apps in general also apply to Angular.
38
+
39
+ * [WebAim](http://webaim.org/)
40
+ * [Using WAI-ARIA in HTML](http://www.w3.org/TR/2014/WD-aria-in-html-20140626/)
You can’t perform that action at this time.
0 commit comments