@@ -12,7 +12,7 @@ describe('Text Field directives', function() {
1212 email : 'ThomasBurleson@gmail.com' ,
1313 password : 'your password is incorrect'
1414 }
15- }
15+ } ;
1616 } ) ;
1717
1818 it ( 'should set input class for focus & blur' , function ( ) {
@@ -200,19 +200,30 @@ describe('Text Field directives', function() {
200200 expect ( label . attr ( 'for' ) ) . toBe ( "093" ) ;
201201 expect ( input . attr ( 'id' ) ) . toBe ( label . attr ( 'for' ) ) ;
202202 } ) ;
203+
203204 it ( 'should auto-pair input and label for accessibility.' , function ( ) {
204205 var markup = '<md-text-float ' +
205206 ' label="{{labels.firstName}}" ' +
206207 ' ng-model="user.firstName" >' +
207208 '</md-text-float>' ;
208209 var el = buildElement ( markup , model ) ;
209210 var input = el . find ( 'input' ) ;
210- var label = el . find ( 'label' )
211+ var label = el . find ( 'label' ) ;
211212
212213 expect ( label . attr ( 'for' ) == "" ) . toBe ( false ) ;
213214 expect ( input . attr ( 'id' ) ) . toBe ( label . attr ( 'for' ) ) ;
214215 } ) ;
215216
217+ it ( 'should add an ARIA attribute for disabled inputs' , function ( ) {
218+ var markup = '<md-text-float disabled ' +
219+ ' label="{{labels.firstName}}" ' +
220+ ' ng-model="user.firstName" >' +
221+ '</md-text-float>' ;
222+ var el = buildElement ( markup , model ) ;
223+ var input = el . find ( 'input' ) ;
224+
225+ expect ( input . attr ( 'aria-disabled' ) ) . toBe ( 'true' ) ;
226+ } ) ;
216227 } ) ;
217228
218229 // ****************************************************************
0 commit comments