More a11y fixes

This commit is contained in:
Dennis Fokin 2024-05-22 16:03:39 +02:00
parent 34c08c962b
commit b54cf1696a
No known key found for this signature in database
GPG Key ID: 870B88256690D8BC
2 changed files with 24 additions and 16 deletions

View File

@ -284,8 +284,11 @@ class _DeviceRowState extends ConsumerState<_DeviceRow> {
overflow: TextOverflow.fade,
softWrap: false,
),
subtitle: Text(widget.subtitle,
overflow: TextOverflow.fade, softWrap: false),
subtitle: Text(
widget.subtitle,
overflow: TextOverflow.fade,
softWrap: false,
),
dense: true,
onTap: widget.onTap,
),
@ -313,19 +316,23 @@ class _DeviceRowState extends ConsumerState<_DeviceRow> {
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 6.5),
child: widget.selected
? IconButton.filled(
tooltip: isDesktop ? tooltip : null,
icon: widget.leading,
padding: const EdgeInsets.symmetric(horizontal: 8),
onPressed: widget.onTap,
)
: IconButton(
tooltip: isDesktop ? tooltip : null,
icon: widget.leading,
padding: const EdgeInsets.symmetric(horizontal: 8),
onPressed: widget.onTap,
color: colorScheme.secondary,
),
? Semantics(
label: tooltip,
child: IconButton.filled(
tooltip: isDesktop ? tooltip : null,
icon: widget.leading,
padding: const EdgeInsets.symmetric(horizontal: 8),
onPressed: widget.onTap,
))
: Semantics(
label: tooltip,
child: IconButton(
tooltip: isDesktop ? tooltip : null,
icon: widget.leading,
padding: const EdgeInsets.symmetric(horizontal: 8),
onPressed: widget.onTap,
color: colorScheme.secondary,
)),
),
);
}

View File

@ -148,7 +148,8 @@ class NavigationContent extends ConsumerWidget {
leading: Icon(
app._icon,
fill: app == currentSection ? 1.0 : 0.0,
semanticLabel: app.getDisplayName(l10n),
semanticLabel:
!extended ? app.getDisplayName(l10n) : null,
),
collapsed: !extended,
selected: app == currentSection,