mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 完善语义适配
This commit is contained in:
@@ -117,9 +117,10 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
dense: false,
|
dense: false,
|
||||||
leading: index == currentIndex
|
leading: index == currentIndex
|
||||||
? Image.asset(
|
? Image.asset(
|
||||||
'assets/images/live.gif',
|
'assets/images/live.png',
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
height: 12,
|
height: 12,
|
||||||
|
semanticLabel: "正在播放:",
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
title: Text(
|
title: Text(
|
||||||
@@ -135,6 +136,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
? Image.asset(
|
? Image.asset(
|
||||||
'assets/images/big-vip.png',
|
'assets/images/big-vip.png',
|
||||||
height: 20,
|
height: 20,
|
||||||
|
semanticLabel: "大会员",
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
),
|
),
|
||||||
@@ -241,6 +243,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
'assets/images/live.png',
|
'assets/images/live.png',
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
height: 12,
|
height: 12,
|
||||||
|
semanticLabel: "正在播放:",
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6)
|
const SizedBox(width: 6)
|
||||||
],
|
],
|
||||||
@@ -260,6 +263,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/big-vip.png',
|
'assets/images/big-vip.png',
|
||||||
height: 16,
|
height: 16,
|
||||||
|
semanticLabel: "大会员",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
if (widget.pages[i].badge != '会员') ...[
|
if (widget.pages[i].badge != '会员') ...[
|
||||||
|
|||||||
@@ -165,10 +165,12 @@ class VideoStat extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
liveItem!.areaName!,
|
liveItem!.areaName!,
|
||||||
style: const TextStyle(fontSize: 11, color: Colors.white),
|
style: const TextStyle(fontSize: 11, color: Colors.white),
|
||||||
|
semanticsLabel: "${liveItem!.areaName!}直播",
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
liveItem!.watchedShow!['text_small'],
|
liveItem!.watchedShow!['text_small'],
|
||||||
style: const TextStyle(fontSize: 11, color: Colors.white),
|
style: const TextStyle(fontSize: 11, color: Colors.white),
|
||||||
|
semanticsLabel: "${liveItem!.watchedShow!['text_small']}围观",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ class _MinePageState extends State<MinePage> {
|
|||||||
semanticsLabel: '头像',
|
semanticsLabel: '头像',
|
||||||
width: 85,
|
width: 85,
|
||||||
height: 85)
|
height: 85)
|
||||||
: Image.asset('assets/images/noface.jpeg'),
|
: Image.asset('assets/images/noface.jpeg',semanticLabel: "默认头像",),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ Widget searchUserPanel(BuildContext context, ctr, list) {
|
|||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/lv/lv${i!.level}.png',
|
'assets/images/lv/lv${i!.level}.png',
|
||||||
height: 11,
|
height: 11,
|
||||||
|
semanticLabel: '等级${i.level}',
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -144,11 +144,12 @@ class _PagesPanelState extends State<PagesPanel> {
|
|||||||
dense: false,
|
dense: false,
|
||||||
leading: index == currentIndex
|
leading: index == currentIndex
|
||||||
? Image.asset(
|
? Image.asset(
|
||||||
'assets/images/live.gif',
|
'assets/images/live.png',
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.primary,
|
.primary,
|
||||||
height: 12,
|
height: 12,
|
||||||
|
semanticLabel: "正在播放:",
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
title: Text(
|
title: Text(
|
||||||
@@ -209,9 +210,10 @@ class _PagesPanelState extends State<PagesPanel> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (i == currentIndex) ...<Widget>[
|
if (i == currentIndex) ...<Widget>[
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/live.gif',
|
'assets/images/live.png',
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
height: 12,
|
height: 12,
|
||||||
|
semanticLabel: "正在播放:",
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6)
|
const SizedBox(width: 6)
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ class _SeasonPanelState extends State<SeasonPanel> {
|
|||||||
.colorScheme
|
.colorScheme
|
||||||
.primary,
|
.primary,
|
||||||
height: 12,
|
height: 12,
|
||||||
|
semanticLabel: "正在播放:",
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
title: Text(
|
title: Text(
|
||||||
@@ -169,9 +170,6 @@ class _SeasonPanelState extends State<SeasonPanel> {
|
|||||||
.colorScheme
|
.colorScheme
|
||||||
.onSurface,
|
.onSurface,
|
||||||
),
|
),
|
||||||
semanticsLabel: index == currentIndex
|
|
||||||
? '当前播放:${episodes![index].title!}'
|
|
||||||
: null,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
itemScrollController: itemScrollController,
|
itemScrollController: itemScrollController,
|
||||||
@@ -197,9 +195,10 @@ class _SeasonPanelState extends State<SeasonPanel> {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 15),
|
const SizedBox(width: 15),
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/live.gif',
|
'assets/images/live.png',
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
height: 12,
|
height: 12,
|
||||||
|
semanticLabel: "正在播放:",
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'assets/images/big-vip.png',
|
'assets/images/big-vip.png',
|
||||||
height: 14,
|
height: 14,
|
||||||
|
semanticLabel: "大会员",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -168,6 +169,7 @@ class ReplyItem extends StatelessWidget {
|
|||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/lv/lv${replyItem!.member!.level}.png',
|
'assets/images/lv/lv${replyItem!.member!.level}.png',
|
||||||
height: 11,
|
height: 11,
|
||||||
|
semanticLabel: "等级:${replyItem!.member!.level}",
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
if (replyItem!.isUp!)
|
if (replyItem!.isUp!)
|
||||||
|
|||||||
@@ -740,6 +740,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'assets/images/loading.gif',
|
'assets/images/loading.gif',
|
||||||
height: 25,
|
height: 25,
|
||||||
|
semanticLabel: "加载中",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -95,7 +95,8 @@ class Utils {
|
|||||||
if (videoItem.rcmdReason != null && videoItem.rcmdReason.content != '') {
|
if (videoItem.rcmdReason != null && videoItem.rcmdReason.content != '') {
|
||||||
semanticsLabel += ',${videoItem.rcmdReason.content}';
|
semanticsLabel += ',${videoItem.rcmdReason.content}';
|
||||||
}
|
}
|
||||||
if (!emptyStatCheck(videoItem.duration)) {
|
if (!emptyStatCheck(videoItem.duration) &&
|
||||||
|
(videoItem.duration is! int || videoItem.duration > 0)) {
|
||||||
semanticsLabel +=
|
semanticsLabel +=
|
||||||
',时长${Utils.durationReadFormat(Utils.timeFormat(videoItem.duration))}';
|
',时长${Utils.durationReadFormat(Utils.timeFormat(videoItem.duration))}';
|
||||||
}
|
}
|
||||||
@@ -107,9 +108,9 @@ class Utils {
|
|||||||
if (videoItem.owner.name != '') {
|
if (videoItem.owner.name != '') {
|
||||||
semanticsLabel += ',Up主:${videoItem.owner.name}';
|
semanticsLabel += ',Up主:${videoItem.owner.name}';
|
||||||
}
|
}
|
||||||
if (videoItem.runtimeType.toString() == "RecVideoItemAppModel" ||
|
if ((videoItem.runtimeType.toString() == "RecVideoItemAppModel" ||
|
||||||
videoItem.runtimeType.toString() == "RecVideoItemModel" &&
|
videoItem.runtimeType.toString() == "RecVideoItemModel") &&
|
||||||
videoItem.isFollowed == 1) {
|
videoItem.isFollowed == 1) {
|
||||||
semanticsLabel += ',已关注';
|
semanticsLabel += ',已关注';
|
||||||
}
|
}
|
||||||
return semanticsLabel;
|
return semanticsLabel;
|
||||||
|
|||||||
Reference in New Issue
Block a user