Grouped checkbuttons in a popover aren't accessible

I have three grouped checkbuttons (thus, three coupled “radiobuttons”) inside a Gtk.Popover, and use toggled signal to close the popover when the user chooses one with the mouse. The problem I have is that, when using the popover with the keyboard, the only way of navigating the checkbuttons is using the cursor keys (TAB does nothing). But moving the focus from one checkbutton to another with the cursor does trigger the toggled signal, so the popover is closed.

So the question is: how can I make the grouped checkbuttons navigable using the keyboard, and only toggle one when pressing Return or Space (thus, “activate” signal), but, at the same time, close the popover when the user selects with the mouse any of the checkbuttons?

Well, what you are describing is the default Radio button behavior. Why don’t you let the user select one of the options and use a button click(or keyboard shortcut) after that to complete the selection before you close the Popover?

I don’t know how you can prevent the toggled signal from being emitted because one of the CheckButtons in the group must be selected at any one point in time. And navigating the grouped CheckButtons does exactly that.

The problem is when the user is blind and rely on a screen reader, or when have other kind of disability and must use only the keyboard: they need to be able to work only with keyboard navigation.

Anyway, I will try using a GMenu…

1 Like

Even a Submit button can be activated with the keyboard. You can also explore the GMenu option.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.