Skip to content

Commit f30f197

Browse files
committed
Add content descriptions
1 parent 155ce25 commit f30f197

File tree

1 file changed

+3
-3
lines changed
  • compose/snippets/src/main/java/com/example/compose/snippets/components

1 file changed

+3
-3
lines changed

compose/snippets/src/main/java/com/example/compose/snippets/components/SearchBar.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ fun SearchBarFilterList(
154154
expanded = expanded,
155155
onExpandedChange = { expanded = it },
156156
placeholder = { Text("Hinted search text") },
157-
leadingIcon = { Icon(Icons.Default.Search, contentDescription = null) },
158-
trailingIcon = { Icon(Icons.Default.MoreVert, contentDescription = null) },
157+
leadingIcon = { Icon(Icons.Default.Search, contentDescription = "Search") },
158+
trailingIcon = { Icon(Icons.Default.MoreVert, contentDescription = "More options") },
159159
)
160160
},
161161
expanded = expanded,
@@ -170,7 +170,7 @@ fun SearchBarFilterList(
170170
leadingContent = {
171171
Icon(
172172
Icons.Filled.Star,
173-
contentDescription = null
173+
contentDescription = "Starred item"
174174
)
175175
},
176176
colors = ListItemDefaults.colors(containerColor = Color.Transparent),

0 commit comments

Comments
 (0)