Skip to content

Commit 155c4f4

Browse files
committed
Accessibility: add labeling for buttons in history top bar widget
1 parent 6e412f4 commit 155c4f4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Telegram/Resources/langs/lang.strings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
460460
"lng_update_telegram" = "Update Telegram";
461461
"lng_dlg_search_in" = "Search messages in";
462462
"lng_dlg_search_from" = "From: {user}";
463+
"lng_chat_menu" = "Chat menu";
463464

464465
"lng_settings_save" = "Save";
465466
"lng_settings_apply" = "Apply";

Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,13 @@ TopBarWidget::TopBarWidget(
251251
}, lifetime());
252252

253253
setCursor(style::cur_pointer);
254+
_call->setAccessibleName(tr::lng_profile_action_short_call(tr::now));
255+
_groupCall->setAccessibleName(tr::lng_group_call_title(tr::now));
256+
_search->setAccessibleName(tr::lng_shortcuts_search(tr::now));
257+
_infoToggle->setAccessibleName(tr::lng_settings_section_info(tr::now));
258+
_menuToggle->setAccessibleName(tr::lng_chat_menu(tr::now));
259+
_back->setAccessibleName(tr::lng_go_back(tr::now));
260+
_cancelChoose->setAccessibleName(tr::lng_cancel(tr::now));
254261
}
255262

256263
TopBarWidget::~TopBarWidget() = default;
@@ -965,6 +972,13 @@ void TopBarWidget::refreshInfoButton() {
965972
}
966973
if (_info) {
967974
_info->setAttribute(Qt::WA_TransparentForMouseEvents);
975+
_info->setAccessibleName(tr::lng_settings_section_info(tr::now));
976+
if (_back && _info) {
977+
QWidget::setTabOrder(_back.data(), _info.data());
978+
}
979+
if (_info && _search) {
980+
QWidget::setTabOrder(_info.data(), _search.data());
981+
}
968982
}
969983
}
970984

0 commit comments

Comments
 (0)