File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,16 @@ function keyboardBindings(event: KeyboardEvent, combobox: Combobox) {
120120      combobox . navigate ( - 1 ) 
121121      event . preventDefault ( ) 
122122      break 
123+     case  'Home' :
124+       combobox . clearSelection ( ) 
125+       combobox . navigate ( 1 ) 
126+       event . preventDefault ( ) 
127+       break 
128+     case  'End' :
129+       combobox . clearSelection ( ) 
130+       combobox . navigate ( - 1 ) 
131+       event . preventDefault ( ) 
132+       break 
123133    case  'n' :
124134      if  ( ctrlBindings  &&  event . ctrlKey )  { 
125135        combobox . navigate ( 1 ) 
Original file line number Diff line number Diff line change @@ -138,6 +138,14 @@ describe('combobox-nav', function() {
138138      assert . equal ( options [ 5 ] . getAttribute ( 'aria-selected' ) ,  'true' ) 
139139      assert . equal ( input . getAttribute ( 'aria-activedescendant' ) ,  'link' ) 
140140
141+       press ( input ,  'Home' ) 
142+       assert . equal ( options [ 0 ] . getAttribute ( 'aria-selected' ) ,  'true' ) 
143+       assert . equal ( input . getAttribute ( 'aria-activedescendant' ) ,  'baymax' ) 
144+ 
145+       press ( input ,  'End' ) 
146+       assert . equal ( options [ 5 ] . getAttribute ( 'aria-selected' ) ,  'true' ) 
147+       assert . equal ( input . getAttribute ( 'aria-activedescendant' ) ,  'link' ) 
148+ 
141149      press ( input ,  'Enter' ) 
142150      assert . equal ( expectedTargets . length ,  2 ) 
143151      assert . equal ( expectedTargets [ 0 ] ,  'hubot' ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments