fix(accessibility): announce selected server state (#6108)
This commit is contained in:
1 parent
1ee1213563
commit
590be2e9ae
10 files changed
+21
-1
No files matched your search
@@ -37,6 +37,8 @@ import androidx.compose.ui.Modifier
|
|||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
|
import androidx.compose.ui.semantics.stateDescription
|
||||||
|
import androidx.compose.ui.semantics.semantics
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.text.style.LineBreak
|
import androidx.compose.ui.text.style.LineBreak
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
@@ -319,11 +321,20 @@ fun ServerListItem(
|
|||||||
} else {
|
} else {
|
||||||
stringResource(R.string.server_test_delay_value, testDelayMillis)
|
stringResource(R.string.server_test_delay_value, testDelayMillis)
|
||||||
}
|
}
|
||||||
|
val selectedStateDescription = if (isSelected) {
|
||||||
|
stringResource(R.string.acc_selected_server)
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
Row(
|
Row(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.height(IntrinsicSize.Min)
|
.height(IntrinsicSize.Min)
|
||||||
|
.semantics {
|
||||||
|
if (selectedStateDescription != null) {
|
||||||
|
stateDescription = selectedStateDescription
|
||||||
|
}
|
||||||
|
}
|
||||||
.clickable(onClick = onClick)
|
.clickable(onClick = onClick)
|
||||||
.then(dragModifier)
|
.then(dragModifier)
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -520,6 +520,7 @@
|
|||||||
<string name="acc_search">بحث</string>
|
<string name="acc_search">بحث</string>
|
||||||
<string name="acc_add">إضافة تكوين</string>
|
<string name="acc_add">إضافة تكوين</string>
|
||||||
<string name="acc_more">المزيد من الخيارات</string>
|
<string name="acc_more">المزيد من الخيارات</string>
|
||||||
|
<string name="acc_selected_server">Selected</string>
|
||||||
<string name="acc_share_subscription">مشاركة رابط الاشتراك</string>
|
<string name="acc_share_subscription">مشاركة رابط الاشتراك</string>
|
||||||
<string name="acc_share_log">مشاركة السجل</string>
|
<string name="acc_share_log">مشاركة السجل</string>
|
||||||
<string name="acc_remove">إزالة عضو من سلسلة الوكلاء</string>
|
<string name="acc_remove">إزالة عضو من سلسلة الوكلاء</string>
|
||||||
|
|||||||
@@ -520,6 +520,7 @@
|
|||||||
<string name="acc_search">অনুসন্ধান করুন</string>
|
<string name="acc_search">অনুসন্ধান করুন</string>
|
||||||
<string name="acc_add">কনফিগারেশন যোগ করুন</string>
|
<string name="acc_add">কনফিগারেশন যোগ করুন</string>
|
||||||
<string name="acc_more">আরও বিকল্প</string>
|
<string name="acc_more">আরও বিকল্প</string>
|
||||||
|
<string name="acc_selected_server">Selected</string>
|
||||||
<string name="acc_share_subscription">সাবস্ক্রিপশন লিংক শেয়ার করুন</string>
|
<string name="acc_share_subscription">সাবস্ক্রিপশন লিংক শেয়ার করুন</string>
|
||||||
<string name="acc_share_log">লগ শেয়ার করুন</string>
|
<string name="acc_share_log">লগ শেয়ার করুন</string>
|
||||||
<string name="acc_remove">প্রক্সি চেইনের সদস্য সরান</string>
|
<string name="acc_remove">প্রক্সি চেইনের সদস্য সরান</string>
|
||||||
|
|||||||
@@ -520,6 +520,7 @@
|
|||||||
<string name="acc_search">پیتینیڌن</string>
|
<string name="acc_search">پیتینیڌن</string>
|
||||||
<string name="acc_add">ٱووردن کانفیگ</string>
|
<string name="acc_add">ٱووردن کانفیگ</string>
|
||||||
<string name="acc_more">امکووݩا بؽتر</string>
|
<string name="acc_more">امکووݩا بؽتر</string>
|
||||||
|
<string name="acc_selected_server">Selected</string>
|
||||||
<string name="acc_share_subscription">یک رسۊوی لینک اشتراک</string>
|
<string name="acc_share_subscription">یک رسۊوی لینک اشتراک</string>
|
||||||
<string name="acc_share_log">یک رسۊوی گوزارش</string>
|
<string name="acc_share_log">یک رسۊوی گوزارش</string>
|
||||||
<string name="acc_remove">پاک کردن عوزو زنجیره پروکسی</string>
|
<string name="acc_remove">پاک کردن عوزو زنجیره پروکسی</string>
|
||||||
|
|||||||
@@ -520,6 +520,7 @@
|
|||||||
<string name="acc_search">جستجو</string>
|
<string name="acc_search">جستجو</string>
|
||||||
<string name="acc_add">افزودن کانفیگ</string>
|
<string name="acc_add">افزودن کانفیگ</string>
|
||||||
<string name="acc_more">گزینههای بیشتر</string>
|
<string name="acc_more">گزینههای بیشتر</string>
|
||||||
|
<string name="acc_selected_server">انتخاب شده</string>
|
||||||
<string name="acc_share_subscription">اشتراکگذاری لینک اشتراک</string>
|
<string name="acc_share_subscription">اشتراکگذاری لینک اشتراک</string>
|
||||||
<string name="acc_share_log">اشتراکگذاری گزارش</string>
|
<string name="acc_share_log">اشتراکگذاری گزارش</string>
|
||||||
<string name="acc_remove">حذف عضو زنجیره پروکسی</string>
|
<string name="acc_remove">حذف عضو زنجیره پروکسی</string>
|
||||||
|
|||||||
@@ -520,6 +520,7 @@
|
|||||||
<string name="acc_search">Поиск</string>
|
<string name="acc_search">Поиск</string>
|
||||||
<string name="acc_add">Добавить профиль</string>
|
<string name="acc_add">Добавить профиль</string>
|
||||||
<string name="acc_more">Дополнительные параметры</string>
|
<string name="acc_more">Дополнительные параметры</string>
|
||||||
|
<string name="acc_selected_server">Selected</string>
|
||||||
<string name="acc_share_subscription">Поделиться ссылкой на подписку</string>
|
<string name="acc_share_subscription">Поделиться ссылкой на подписку</string>
|
||||||
<string name="acc_share_log">Поделиться журналом</string>
|
<string name="acc_share_log">Поделиться журналом</string>
|
||||||
<string name="acc_remove">Удалить участника цепочки прокси</string>
|
<string name="acc_remove">Удалить участника цепочки прокси</string>
|
||||||
|
|||||||
@@ -520,6 +520,7 @@
|
|||||||
<string name="acc_search">Tìm kiếm</string>
|
<string name="acc_search">Tìm kiếm</string>
|
||||||
<string name="acc_add">Thêm cấu hình</string>
|
<string name="acc_add">Thêm cấu hình</string>
|
||||||
<string name="acc_more">Tùy chọn khác</string>
|
<string name="acc_more">Tùy chọn khác</string>
|
||||||
|
<string name="acc_selected_server">Selected</string>
|
||||||
<string name="acc_share_subscription">Chia sẻ liên kết đăng ký</string>
|
<string name="acc_share_subscription">Chia sẻ liên kết đăng ký</string>
|
||||||
<string name="acc_share_log">Chia sẻ nhật ký</string>
|
<string name="acc_share_log">Chia sẻ nhật ký</string>
|
||||||
<string name="acc_remove">Xóa thành viên khỏi chuỗi proxy</string>
|
<string name="acc_remove">Xóa thành viên khỏi chuỗi proxy</string>
|
||||||
|
|||||||
@@ -520,6 +520,7 @@
|
|||||||
<string name="acc_search">搜索</string>
|
<string name="acc_search">搜索</string>
|
||||||
<string name="acc_add">添加配置</string>
|
<string name="acc_add">添加配置</string>
|
||||||
<string name="acc_more">更多选项</string>
|
<string name="acc_more">更多选项</string>
|
||||||
|
<string name="acc_selected_server">Selected</string>
|
||||||
<string name="acc_share_subscription">分享订阅链接</string>
|
<string name="acc_share_subscription">分享订阅链接</string>
|
||||||
<string name="acc_share_log">分享日志</string>
|
<string name="acc_share_log">分享日志</string>
|
||||||
<string name="acc_remove">移除代理链成员</string>
|
<string name="acc_remove">移除代理链成员</string>
|
||||||
|
|||||||
@@ -520,6 +520,7 @@
|
|||||||
<string name="acc_search">搜尋</string>
|
<string name="acc_search">搜尋</string>
|
||||||
<string name="acc_add">新增設定</string>
|
<string name="acc_add">新增設定</string>
|
||||||
<string name="acc_more">更多選項</string>
|
<string name="acc_more">更多選項</string>
|
||||||
|
<string name="acc_selected_server">Selected</string>
|
||||||
<string name="acc_share_subscription">分享訂閱連結</string>
|
<string name="acc_share_subscription">分享訂閱連結</string>
|
||||||
<string name="acc_share_log">分享日誌</string>
|
<string name="acc_share_log">分享日誌</string>
|
||||||
<string name="acc_remove">移除代理鏈成員</string>
|
<string name="acc_remove">移除代理鏈成員</string>
|
||||||
|
|||||||
@@ -520,6 +520,7 @@
|
|||||||
<string name="acc_search">Search</string>
|
<string name="acc_search">Search</string>
|
||||||
<string name="acc_add">Add configuration</string>
|
<string name="acc_add">Add configuration</string>
|
||||||
<string name="acc_more">More options</string>
|
<string name="acc_more">More options</string>
|
||||||
|
<string name="acc_selected_server">Selected</string>
|
||||||
<string name="acc_share_subscription">Share subscription link</string>
|
<string name="acc_share_subscription">Share subscription link</string>
|
||||||
<string name="acc_share_log">Share log</string>
|
<string name="acc_share_log">Share log</string>
|
||||||
<string name="acc_remove">Remove proxy chain member</string>
|
<string name="acc_remove">Remove proxy chain member</string>
|
||||||
|
|||||||
Reference in new issue
Block a user