File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ var Input = (function() {
3636 this . $input = $ ( o . input ) ;
3737 this . $menu = $ ( o . menu ) ;
3838
39- // this id is used for aria-owns
39+ // this id is used for aria-owns and aria-controls
4040 id = this . $input . attr ( 'id' ) || _ . guid ( ) ;
4141
4242 this . $menu . attr ( 'id' , id + '_listbox' ) ;
@@ -47,6 +47,7 @@ var Input = (function() {
4747
4848 this . $input . attr ( {
4949 'aria-owns' : id + '_listbox' ,
50+ 'aria-controls' : id + '_listbox' ,
5051 role : 'combobox' ,
5152 'aria-autocomplete' : 'list' ,
5253 'aria-expanded' : false
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ describe('Input', function() {
3232 function noInput ( ) { new Input ( { } , www ) ; }
3333 } ) ;
3434
35+ it ( 'should have an aria-controls attribute' , function ( ) {
36+ expect ( this . $input . attr ( "aria-controls" ) ) . toBeDefined ( ) ;
37+ } ) ;
38+
3539 describe ( 'when the blur DOM event is triggered' , function ( ) {
3640 it ( 'should reset the input value' , function ( ) {
3741 this . view . setQuery ( 'wine' ) ;
You can’t perform that action at this time.
0 commit comments