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, overflow: TextOverflow.fade,
softWrap: false, softWrap: false,
), ),
subtitle: Text(widget.subtitle, subtitle: Text(
overflow: TextOverflow.fade, softWrap: false), widget.subtitle,
overflow: TextOverflow.fade,
softWrap: false,
),
dense: true, dense: true,
onTap: widget.onTap, onTap: widget.onTap,
), ),
@ -313,19 +316,23 @@ class _DeviceRowState extends ConsumerState<_DeviceRow> {
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(vertical: 6.5), padding: const EdgeInsets.symmetric(vertical: 6.5),
child: widget.selected child: widget.selected
? IconButton.filled( ? Semantics(
tooltip: isDesktop ? tooltip : null, label: tooltip,
icon: widget.leading, child: IconButton.filled(
padding: const EdgeInsets.symmetric(horizontal: 8), tooltip: isDesktop ? tooltip : null,
onPressed: widget.onTap, icon: widget.leading,
) padding: const EdgeInsets.symmetric(horizontal: 8),
: IconButton( onPressed: widget.onTap,
tooltip: isDesktop ? tooltip : null, ))
icon: widget.leading, : Semantics(
padding: const EdgeInsets.symmetric(horizontal: 8), label: tooltip,
onPressed: widget.onTap, child: IconButton(
color: colorScheme.secondary, 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( leading: Icon(
app._icon, app._icon,
fill: app == currentSection ? 1.0 : 0.0, fill: app == currentSection ? 1.0 : 0.0,
semanticLabel: app.getDisplayName(l10n), semanticLabel:
!extended ? app.getDisplayName(l10n) : null,
), ),
collapsed: !extended, collapsed: !extended,
selected: app == currentSection, selected: app == currentSection,