JDK-8080647 : Tab key cannot be used to select an alternative in radio button group
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8u40
  • Priority: P3
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2015-05-19
  • Updated: 2015-06-15
  • Resolved: 2015-06-15
Related Reports
Relates :  
Description
Steps to reproduce:
Compile and run the attached RadioButtonTest.java.

Expected behavior:
When the app starts the first radio button is selected and has focus.
Pressing Tab key moves focus to the second radio button.
Pressing Tab key once again moves focus to the third radio button.
Pressing Space selects the third radio button.

Actual:
Pressing Tab key has no effect.
Pressing Down or Right arrow key moves focus and selects the second radio button.
Pressing Down or Right key once again moves focus and selects the third radio button.
Comments
It was a bug in Swing where radio button behavior was incorrect. To select other options, one pressed Tab to move focus to another radio button and then pressed Space to select the focused button. It was fixed under JDK-8033699. The correct behavior: Arrow keys are used to change the selected option. Pressing Tab or Shift-Tab moves focus to the next or previous control outside the radio button group. See also "Radio Buttons" article in Microsoft Windows UI Guidelines: https://msdn.microsoft.com/en-us/library/windows/desktop/dn742436%28v=vs.85%29.aspx
15-06-2015