emulatetab
emulatetab copied to clipboard
Emulating tabbing to radio buttons should focus the selected radio button, if any
Spotted in the PlusAsTab enter-as-tab demo using Chrome 18.
Expected behavior
- Click "Radio 2" to select radio button number two.
- Focus the number input field ("999").
- Press tab once. Notice that radio button two receives focus.
- Press tab once. The text box ("You can even...") receives focus.
Steps to reproduce
- Click "Radio 2" to select radio button number two.
- Focus the number input field ("999").
- Press enter once. Notice that radio button one receives focus. This is the bug.
- Press enter once. The text box ("You can even...") receives focus.
Same thing goes for shift-tab and shift-enter.
Test cases
Needs test cases where, out of three radio buttons
- no radio button is selected.
- where the first is selected.
- where the middle is selected.
- where the last is selected.