Skip to content

Add screen reader support for country select box#30303

Open
rezabakhshilaktasaraei wants to merge 1 commit intotelegramdesktop:devfrom
rezabakhshilaktasaraei:acc-country-select-box
Open

Add screen reader support for country select box#30303
rezabakhshilaktasaraei wants to merge 1 commit intotelegramdesktop:devfrom
rezabakhshilaktasaraei:acc-country-select-box

Conversation

@rezabakhshilaktasaraei
Copy link
Contributor

Summary

Exposes painted country rows in the country select box as virtual accessibility children, making the list navigable by screen readers.

Changes (country_select_box.cpp)

  • Overrides accessibilityChildCount(), accessibilityChildName(), accessibilityChildRect(), accessibilityChildState(), and accessibilityChildRole() on the inner widget.
  • Each country row becomes a ListItem accessible child.
  • In phone mode, the name combines country name + dial code (e.g. "Iran, +98").
  • In non-phone mode, only the country name is used.
  • Fires accessibilityChildFocused() when selection changes via keyboard.
  • Announces selected row on focusInEvent.

Dependencies

  • Requires lib_ui#278 for Accessible::Item infrastructure.

No new lang keys

Uses only existing lng_country_* keys — no new strings added.

Test plan

  • Open country selector (phone registration or settings) with a screen reader
  • Navigate rows with arrow keys — screen reader announces country name (and dial code in phone mode)
  • Verify hit-testing: clicking a row with screen reader cursor selects the correct country
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant