fix(accessibility): label icon controls and semantic tap targets

This commit is contained in:
Storm Dragon 2026-02-27 15:41:57 -05:00
parent e30e84ded1
commit b552e9843c
15 changed files with 118 additions and 66 deletions

View file

@ -218,6 +218,15 @@ class _BookOnShelfPlayButton extends HookConsumerWidget {
(element) => element.libraryItemId == libraryItemId,
);
final isBookCompleted = userProgress?.isFinished ?? false;
final playTooltip = isCurrentBookSetInPlayer
? isPlayingThisBook
? 'Pause'
: 'Resume'
: isBookCompleted
? 'Listen again'
: userProgress?.progress != null
? 'Continue listening'
: 'Start listening';
const size = 40.0;
@ -268,6 +277,7 @@ class _BookOnShelfPlayButton extends HookConsumerWidget {
// the play button
IconButton(
tooltip: playTooltip,
color: Theme.of(context).colorScheme.primary,
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),