Combo box must have relation controls

Gtk inspector flags this accessibility issue in a Gtk.DropDown. How do I fix it?

combo box must have relation controls

Hi,

I saw that too. Looking at the Gtk code, the new GtkDropDown has a “controls” relation to its popdown list widget, while such relation is not implemented on GtkComboBox side, probably because it’s a deprecated widget and maintainers didn’t want to spend time on it.

I don’t follow. What do you mean by this?

It means a “relation controls” has to be implemented for GtkComboBox. Probably on Gtk side.

But as said GtkComboBox is deprecated, users should use GtkDropDown instead, which have better accessibility support.

Actually that warning is flagged on a GtkDropDown not a GtkComboBox. Despite combo box being mentioned in the message, I’m not sure it has anything to do with the deprecated GtkComboBox widget.

In fact, I suspect it is because Gtk.Dropdown uses the GTK_ACCESSIBLE_ROLE_COMBO_BOX. Therefore, the combo box reference in the message has something to do with the widget’s accessible role rather than the deprecated GtkComboBox widget.

Ah, yes, you’re right… there is a double mistake on my side:

  • both the GtkDropDown and the GtkComboBox use the COMBO_BOX role
  • and the GtkDropDown doesn’t implement a relation controls by default (no idea at what I was looking in the code, maybe some menu button)

That leaves me puzzled too… I don’t understand what’s expected here by the a11y warning.
Does it expect the combo to advertise a control on the popover, like the others menu-like widgets? Or something else?

Looks like it’s really about the popup, according to ARIA: ARIA: combobox role - ARIA | MDN

So something is missing on Gtk side. I don’t see how we could do that on application side.

1 Like