Skip to content

compiler: Add combobox accessible-item-index/accessible-item-count access. - #13417

Open
Montel wants to merge 1 commit into
slint-ui:masterfrom
Montel:add_combobox_accessibility
Open

Montel wants to merge 1 commit into
slint-ui:masterfrom
Montel:add_combobox_accessibility

Conversation

@Montel

@Montel Montel commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@ogoffart

Copy link
Copy Markdown
Member

I don't think accessible-item-index and accessible-item-count are the right properties here.

They describe an item inside a group and the container of that group. accessible-item-index goes on the item, accessible-item-count on the container.
That's how ListView, RadioGroup and TabWidget use them.

The group is the options in the popup.

(Also, current-index is already 1 in the test, so set_current_index(1) changes nothing and the assert would pass either way. Use 0 or 2.)

CC @DataTriny

@DataTriny

Copy link
Copy Markdown
Contributor

The combobox or dropdown list is a weird creature in terms of accessibility and that is why I didn't handle it before.

On Windows and Linux, some screen readers can report the number of items and the position of the currently selected item when the user focuses the widget while it is collapsed. Something like: "Select your preferred language: English, 3 of 10, collapsed". The proposed changes here indeed collide with the decision we took a while back to not set accessible-item-count and accessible-item-index on the same element, but we will need to use these properties in some way.
I think we first need to revisit how the combobox widget and its items are exposed in the accessibility tree. Usually the listbox/menu/popup would be a child of the combobox but this is not the case with Slint.
AccessKit currently doesn't properly support comboboxes anyway so it wouldn't be convenient to test. Let me think about this and come back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants