@@ -144,6 +144,24 @@ describe('combobox-nav', function() {
144144 assert . equal ( expectedTargets [ 1 ] , 'baymax' )
145145 } )
146146
147+ it ( 'clear selection on input operation' , function ( ) {
148+ press ( input , 'ArrowDown' )
149+ assert . equal ( options [ 0 ] . getAttribute ( 'aria-selected' ) , 'true' )
150+ assert . equal ( input . getAttribute ( 'aria-activedescendant' ) , 'baymax' )
151+
152+ press ( input , 'ArrowLeft' )
153+ assert ( ! list . querySelector ( '[aria-selected=true]' ) , 'Nothing should be selected' )
154+ assert ( ! input . hasAttribute ( 'aria-activedescendant' ) , 'Nothing should be selected' )
155+
156+ press ( input , 'ArrowDown' )
157+ assert . equal ( options [ 0 ] . getAttribute ( 'aria-selected' ) , 'true' )
158+ assert . equal ( input . getAttribute ( 'aria-activedescendant' ) , 'baymax' )
159+
160+ press ( input , 'Backspace' )
161+ assert ( ! list . querySelector ( '[aria-selected=true]' ) , 'Nothing should be selected' )
162+ assert ( ! input . hasAttribute ( 'aria-activedescendant' ) , 'Nothing should be selected' )
163+ } )
164+
147165 it ( 'fires event and follows the link on click' , function ( ) {
148166 let eventFired = false
149167 document . addEventListener ( 'combobox-commit' , function ( ) {
0 commit comments