Skip to content

Commit

Permalink
Only set the contentDescription on NavigationRail
Browse files Browse the repository at this point in the history
  • Loading branch information
sirambd committed Jul 25, 2024
1 parent 6f13bea commit 5e85ba0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ private fun MainScaffold(
NavigationItem.entries.forEach { navigationItem ->
item(
icon = {
Icon(navigationItem.icon, stringResource(navigationItem.label))
val contentDescription = when (navType) {
NavigationSuiteType.NavigationRail -> stringResource(navigationItem.label)
else -> ""
}
Icon(navigationItem.icon, contentDescription)
},
label = {
if (navType == NavigationSuiteType.NavigationBar) {
Expand Down

0 comments on commit 5e85ba0

Please sign in to comment.