Styling the autocomplete dropdown to work with the up/down arrow keys The following custom styling for drupal core's autocomplete dropdown works when hovering, but it is ignored when using the up/down arrow keys. (Currently, pressing the arrow keys only turns the text white.) 

Does anybody know the secret to getting styles and keypresses working together?

#autocomplete li:hover, #autocomplete li:focus{ 
background-color:#428bca;
color:green;
}
This should work:  

#autocomplete li.selected { 
  background-color:#428bca;
  color:green;
}


The items from the autocomplete list are having the .selected class added on hover/key navigation.