16
16
*
17
17
* For ngAria to do its magic, simply include the module `ngAria` as a dependency. The following
18
18
* directives are supported:
19
- * `ngModel`, `ngChecked`, `ngRequired`, `ngValue`, `ngDisabled`, `ngShow`, `ngHide`, `ngClick`,
19
+ * `ngModel`, `ngChecked`, `ngReadonly`, ` ngRequired`, `ngValue`, `ngDisabled`, `ngShow`, `ngHide`, `ngClick`,
20
20
* `ngDblClick`, and `ngMessages`.
21
21
*
22
22
* Below is a more detailed breakdown of the attributes handled by ngAria:
25
25
* |---------------------------------------------|----------------------------------------------------------------------------------------|
26
26
* | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles |
27
27
* | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled |
28
- * | {@link ng.directive:ngRequired ngRequired} | aria-required |
29
- * | {@link ng.directive:ngChecked ngChecked} | aria-checked |
28
+ * | {@link ng.directive:ngRequired ngRequired} | aria-required
29
+ * | {@link ng.directive:ngChecked ngChecked} | aria-checked
30
+ * | {@link ng.directive:ngReadonly ngReadonly} | aria-readonly ||
30
31
* | {@link ng.directive:ngValue ngValue} | aria-checked |
31
32
* | {@link ng.directive:ngShow ngShow} | aria-hidden |
32
33
* | {@link ng.directive:ngHide ngHide} | aria-hidden |
@@ -91,6 +92,7 @@ function $AriaProvider() {
91
92
var config = {
92
93
ariaHidden : true ,
93
94
ariaChecked : true ,
95
+ ariaReadonly : true ,
94
96
ariaDisabled : true ,
95
97
ariaRequired : true ,
96
98
ariaInvalid : true ,
@@ -108,6 +110,7 @@ function $AriaProvider() {
108
110
*
109
111
* - **ariaHidden** – `{boolean}` – Enables/disables aria-hidden tags
110
112
* - **ariaChecked** – `{boolean}` – Enables/disables aria-checked tags
113
+ * - **ariaReadonly** – `{boolean}` – Enables/disables aria-readonly tags
111
114
* - **ariaDisabled** – `{boolean}` – Enables/disables aria-disabled tags
112
115
* - **ariaRequired** – `{boolean}` – Enables/disables aria-required tags
113
116
* - **ariaInvalid** – `{boolean}` – Enables/disables aria-invalid tags
@@ -170,6 +173,7 @@ function $AriaProvider() {
170
173
* The full list of directives that interface with ngAria:
171
174
* * **ngModel**
172
175
* * **ngChecked**
176
+ * * **ngReadonly**
173
177
* * **ngRequired**
174
178
* * **ngDisabled**
175
179
* * **ngValue**
@@ -209,6 +213,9 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
209
213
. directive ( 'ngChecked' , [ '$aria' , function ( $aria ) {
210
214
return $aria . $$watchExpr ( 'ngChecked' , 'aria-checked' , nodeBlackList , false ) ;
211
215
} ] )
216
+ . directive ( 'ngReadonly' , [ '$aria' , function ( $aria ) {
217
+ return $aria . $$watchExpr ( 'ngReadonly' , 'aria-readonly' , nodeBlackList , false ) ;
218
+ } ] )
212
219
. directive ( 'ngRequired' , [ '$aria' , function ( $aria ) {
213
220
return $aria . $$watchExpr ( 'ngRequired' , 'aria-required' , nodeBlackList , false ) ;
214
221
} ] )
0 commit comments