1616 *
1717 * For ngAria to do its magic, simply include the module `ngAria` as a dependency. The following
1818 * directives are supported:
19- * `ngModel`, `ngChecked`, `ngRequired`, `ngValue`, `ngDisabled`, `ngShow`, `ngHide`, `ngClick`,
19+ * `ngModel`, `ngChecked`, `ngReadonly`, ` ngRequired`, `ngValue`, `ngDisabled`, `ngShow`, `ngHide`, `ngClick`,
2020 * `ngDblClick`, and `ngMessages`.
2121 *
2222 * Below is a more detailed breakdown of the attributes handled by ngAria:
2525 * |---------------------------------------------|----------------------------------------------------------------------------------------|
2626 * | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles |
2727 * | {@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 ||
3031 * | {@link ng.directive:ngValue ngValue} | aria-checked |
3132 * | {@link ng.directive:ngShow ngShow} | aria-hidden |
3233 * | {@link ng.directive:ngHide ngHide} | aria-hidden |
@@ -91,6 +92,7 @@ function $AriaProvider() {
9192 var config = {
9293 ariaHidden : true ,
9394 ariaChecked : true ,
95+ ariaReadonly : true ,
9496 ariaDisabled : true ,
9597 ariaRequired : true ,
9698 ariaInvalid : true ,
@@ -108,6 +110,7 @@ function $AriaProvider() {
108110 *
109111 * - **ariaHidden** – `{boolean}` – Enables/disables aria-hidden tags
110112 * - **ariaChecked** – `{boolean}` – Enables/disables aria-checked tags
113+ * - **ariaReadonly** – `{boolean}` – Enables/disables aria-readonly tags
111114 * - **ariaDisabled** – `{boolean}` – Enables/disables aria-disabled tags
112115 * - **ariaRequired** – `{boolean}` – Enables/disables aria-required tags
113116 * - **ariaInvalid** – `{boolean}` – Enables/disables aria-invalid tags
@@ -170,6 +173,7 @@ function $AriaProvider() {
170173 * The full list of directives that interface with ngAria:
171174 * * **ngModel**
172175 * * **ngChecked**
176+ * * **ngReadonly**
173177 * * **ngRequired**
174178 * * **ngDisabled**
175179 * * **ngValue**
@@ -209,6 +213,9 @@ ngAriaModule.directive('ngShow', ['$aria', function($aria) {
209213. directive ( 'ngChecked' , [ '$aria' , function ( $aria ) {
210214 return $aria . $$watchExpr ( 'ngChecked' , 'aria-checked' , nodeBlackList , false ) ;
211215} ] )
216+ . directive ( 'ngReadonly' , [ '$aria' , function ( $aria ) {
217+ return $aria . $$watchExpr ( 'ngReadonly' , 'aria-readonly' , nodeBlackList , false ) ;
218+ } ] )
212219. directive ( 'ngRequired' , [ '$aria' , function ( $aria ) {
213220 return $aria . $$watchExpr ( 'ngRequired' , 'aria-required' , nodeBlackList , false ) ;
214221} ] )
0 commit comments