mod: 无障碍语义适配

This commit is contained in:
orz12
2024-02-29 21:00:53 +08:00
parent 19117a041a
commit f8e6ec00f9
65 changed files with 683 additions and 390 deletions

View File

@@ -104,6 +104,7 @@ class _MemberPageState extends State<MemberPage>
),
actions: [
IconButton(
tooltip: '搜索',
onPressed: () => Get.toNamed(
'/memberSearch?mid=$mid&uname=${_memberController.memberInfo.value.name!}'),
icon: const Icon(Icons.search_outlined),
@@ -310,17 +311,20 @@ class _MemberPageState extends State<MemberPage>
FontAwesomeIcons.venus,
size: 14,
color: Colors.pink,
semanticLabel: _memberController.memberInfo.value.sex,
),
if (_memberController.memberInfo.value.sex == '')
const Icon(
FontAwesomeIcons.mars,
size: 14,
color: Colors.blue,
semanticLabel: _memberController.memberInfo.value.sex,
),
const SizedBox(width: 4),
Image.asset(
'assets/images/lv/lv${_memberController.memberInfo.value.level}.png',
height: 11,
semanticLabel: '等级${_memberController.memberInfo.value.level}',
),
const SizedBox(width: 6),
if (_memberController
@@ -333,6 +337,7 @@ class _MemberPageState extends State<MemberPage>
_memberController.memberInfo.value.vip!
.label!['img_label_uri_hans'],
height: 20,
semanticLabel: _memberController.memberInfo.value.vip!.label!['text'],
),
] else if (_memberController
.memberInfo.value.vip!.status ==
@@ -344,6 +349,7 @@ class _MemberPageState extends State<MemberPage>
_memberController.memberInfo.value.vip!
.label!['img_label_uri_hans_static'],
height: 20,
semanticLabel: _memberController.memberInfo.value.vip!.label!['text'],
),
]
],

View File

@@ -147,28 +147,30 @@ class ProfilePanel extends StatelessWidget {
],
),
),
Column(
children: [
Text(
!loadingStatus
? ctr.userStat!['likes'] != null
? Utils.numFormat(
ctr.userStat!['likes'],
)
: '-'
: '-',
style: const TextStyle(
fontWeight: FontWeight.bold)),
Text(
'获赞',
style: TextStyle(
fontSize: Theme.of(context)
.textTheme
.labelMedium!
.fontSize),
)
],
),
InkWell(
onTap: null,
child: Column(
children: [
Text(
!loadingStatus
? ctr.userStat!['likes'] != null
? Utils.numFormat(
ctr.userStat!['likes'],
)
: '-'
: '-',
style: const TextStyle(
fontWeight: FontWeight.bold)),
Text(
'获赞',
style: TextStyle(
fontSize: Theme.of(context)
.textTheme
.labelMedium!
.fontSize),
)
],
)),
],
),
),
@@ -221,8 +223,7 @@ class ProfilePanel extends StatelessWidget {
TextButton(
onPressed: () {
Get.toNamed('/webview', parameters: {
'url':
'https://account.bilibili.com/account/home',
'url': 'https://account.bilibili.com/account/home',
'pageTitle': '编辑资料(建议浏览器打开)',
'type': 'url'
});

View File

@@ -43,6 +43,7 @@ class MemberSeasonsPanel extends StatelessWidget {
width: 35,
height: 35,
child: IconButton(
tooltip: '前往',
onPressed: () => Get.toNamed(
'/memberSeasons?mid=${item.meta!.mid}&seasonId=${item.meta!.seasonId}'),
style: ButtonStyle(