diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 534070fcfb..cf6ce63c40 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -460,6 +460,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_update_telegram" = "Update Telegram"; "lng_dlg_search_in" = "Search messages in"; "lng_dlg_search_from" = "From: {user}"; +"lng_chat_menu" = "Chat menu"; "lng_settings_save" = "Save"; "lng_settings_apply" = "Apply"; diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp index c14e08bd7f..6eb1651d64 100644 --- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp @@ -258,6 +258,13 @@ TopBarWidget::TopBarWidget( }, lifetime()); setCursor(style::cur_pointer); + _call->setAccessibleName(tr::lng_profile_action_short_call(tr::now)); + _groupCall->setAccessibleName(tr::lng_group_call_title(tr::now)); + _search->setAccessibleName(tr::lng_shortcuts_search(tr::now)); + _infoToggle->setAccessibleName(tr::lng_settings_section_info(tr::now)); + _menuToggle->setAccessibleName(tr::lng_chat_menu(tr::now)); + _back->setAccessibleName(tr::lng_go_back(tr::now)); + _cancelChoose->setAccessibleName(tr::lng_cancel(tr::now)); } TopBarWidget::~TopBarWidget() = default; @@ -1002,6 +1009,13 @@ void TopBarWidget::refreshInfoButton() { } if (_info) { _info->setAttribute(Qt::WA_TransparentForMouseEvents); + _info->setAccessibleName(tr::lng_settings_section_info(tr::now)); + if (_back && _info) { + QWidget::setTabOrder(_back.data(), _info.data()); + } + if (_info && _search) { + QWidget::setTabOrder(_info.data(), _search.data()); + } } } diff --git a/Telegram/SourceFiles/ui/controls/send_button.cpp b/Telegram/SourceFiles/ui/controls/send_button.cpp index 0dd88a0f57..54b5c222e7 100644 --- a/Telegram/SourceFiles/ui/controls/send_button.cpp +++ b/Telegram/SourceFiles/ui/controls/send_button.cpp @@ -16,6 +16,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_boxes.h" #include "styles/style_chat_helpers.h" #include "styles/style_credits.h" +#include "lang/lang_keys.h" +#include "ui/text/format_values.h" namespace Ui { namespace { @@ -79,6 +81,27 @@ void SendButton::setState(State state) { } _state = state; + setAccessibleName([&] { + switch (_state.type) { + case Type::Send: return tr::lng_send_button(tr::now); + case Type::Record: + return tr::lng_shortcuts_record_voice_message(tr::now); + case Type::Round: + return tr::lng_shortcuts_record_round_message(tr::now); + case Type::Cancel: return tr::lng_cancel(tr::now); + case Type::Save: return tr::lng_settings_save(tr::now); + case Type::Slowmode: + return tr::lng_slowmode_enabled( + tr::now, + lt_left, + Ui::FormatDurationWordsSlowmode(_state.slowmodeDelay)); + case Type::Schedule: return tr::lng_schedule_button(tr::now); + case Type::EditPrice: + return tr::lng_suggest_menu_edit_price(tr::now); + } + Unexpected("Send button type."); + }()); + if (voiceRoundTransition) { _voiceRoundAnimating = true; diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 43508216d6..804feb7eb0 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 43508216d607025af8de8565637b75888500c04f +Subproject commit 804feb7eb0bf8b7d62bb52fa9516b951c33785fc