Select List Test

The issue under investigation is that when using the keyboard to select an item from a select list after it has been hidden at least once, the value which is reported as "selected" is wrong.

We use jQuery to handle change and keypress events on the list. We want to be able to track the selection as it moves. The problem is that change events are only fired when the list looses focus. To get around this, we track keypress events and when we get an up or down arrow, we manually fire a change event on the list.

This does work, and it reports the correct currently selected value using both DOM calls and jQuery. However, after the list is hidden and then re-shown, and an arrow key is pressed, the value reported is incorrect.

Steps to reproduce:

  1. Navigate to listbox and confirm that current selection matches values displayed in log (screen reader will read log automatically)
  2. Hide and then show the listbox by clicking the button twice (alt+shift+h in firefox)
  3. Navigate to listbox and confirm that value shown in log does not match current selection