Skip to content

Use List/ListItem accessibility role for ordered button strips#311

Open
rezabakhshilaktasaraei wants to merge 1 commit into
desktop-app:masterfrom
rezabakhshilaktasaraei:accessibility/folders-list
Open

Use List/ListItem accessibility role for ordered button strips#311
rezabakhshilaktasaraei wants to merge 1 commit into
desktop-app:masterfrom
rezabakhshilaktasaraei:accessibility/folders-list

Conversation

@rezabakhshilaktasaraei

Copy link
Copy Markdown
Contributor

Summary

Switches the chat-folders strip accessibility model from a tab control to a list, which matches NVDA's native single-selection list behaviour better.

  • Rename AbstractButton's page-tab flag to list-item (setIsListItem / isListItem), so a flagged button reports the ListItem role instead of PageTab — mirroring how the menu-button flag maps to ButtonMenu.
  • Remove the now-unused QAccessibleSelectionInterface implementation and the PageTabList focus / SetFocus forwarding from Ui::Accessible::Widget. A List container is handled by Qt's bridge through the default state().selected path, so the custom selection interface isn't needed. The attributes (orientation) interface is kept.

Paired with the tdesktop change that gives the folders container the List role and wires each folder as a ListItem.

Rename AbstractButton's page-tab flag to list-item (setIsListItem /
isListItem), so a flagged button reports the ListItem role instead of
PageTab - mirroring how the menu-button flag maps to ButtonMenu. A list
of items matches NVDA's native single-selection list behaviour better
than a tab control for the chat-folders strip.

Adapt Ui::Accessible::Widget's selection support from PageTabList/PageTab
to List/ListItem rather than dropping it: the container exposes
QAccessibleSelectionInterface for the List role; select() invokes
pressAction() - a list item only implements pressAction, not the
toggleAction() Qt's default ListItem path would call - and rejects items
that are not selectable, so a locked folder is never claimed as a
successful selection. The container's focus / SetFocus forwarding is
likewise kept for List, landing focus on the selected item instead of the
inert container. A locked folder reports selectable = false.
@rezabakhshilaktasaraei rezabakhshilaktasaraei force-pushed the accessibility/folders-list branch from 0b8a6d4 to 97547ab Compare June 25, 2026 15:51
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.

1 participant