Skip to content

Commit

Permalink
Accessibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ofalvai committed Dec 31, 2022
1 parent c5b292e commit bcc6b76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.layout.layout
import androidx.compose.ui.res.painterResource
Expand All @@ -46,7 +45,6 @@ import androidx.compose.ui.unit.dp
import com.airbnb.android.showkase.annotation.ShowkaseComposable
import com.ofalvai.habittracker.core.ui.theme.CoreIcons
import com.ofalvai.habittracker.core.ui.theme.PreviewTheme
import com.ofalvai.habittracker.core.ui.R as coreR
import com.ofalvai.habittracker.feature.insights.R as insightsR

@Composable
Expand Down Expand Up @@ -116,9 +114,10 @@ fun InsightHeader(
fun EmptyView(label: String) {
Column(Modifier.fillMaxWidth().padding(horizontal = 16.dp, vertical = 8.dp)) {
Icon(
modifier = Modifier.size(64.dp).align(Alignment.CenterHorizontally).alpha(0.5f),
modifier = Modifier.size(64.dp).align(Alignment.CenterHorizontally),
painter = painterResource(insightsR.drawable.ic_insights_placeholder),
contentDescription = stringResource(coreR.string.common_empty)
contentDescription = null,
tint = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(Modifier.height(16.dp))
Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private fun DayCell(
} else Modifier
Box(
modifier = Modifier
.semantics {
.semantics(mergeDescendants = true) {
text = AnnotatedString(DateTimeFormatter.ofPattern("LL dd").format(day.date))
}
.padding(4.dp)
Expand Down

0 comments on commit bcc6b76

Please sign in to comment.