Question

I have radio buttons in a groupbox and I want to happen when each time I press TAB, the focus will be on the next radio button. How will I do that? What's happening is that the only one that is getting the focus is the first radio button. Their TabStop is set to True and their TabIndex is in order.

Was it helpful?

Solution

When using a radio button group, you can tab to the group, and then use the arrow keys to navigate to next and previous. As far as I am aware, that is the expected behaviour.

This looks like an old article, but they mention here the use of arrow keys in a group

Again, an old article here, but accessibility hasn't changed around this.

Radio buttons are used in sets, identified by their sharing the same name attribute value. This implies some differences in their treatment by browsers. Consider the following example, where the three buttons all belong to the same group, i.e. have the same name attribute:

On IE, when a radio button group is reached via tabbing, the initially selected button is focused on, and the dotted rectangle indicates this. You can use arrow keys to move between the buttons inside the group; both "down" and "right" arrow move forward inside the group, and both "up" and "left" arrow move backward. And upon moving to a button, that button gets checked (and the button in the group that was checked gets unchecked).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top