ursus
01/16/2025, 3:31 PM@Composable
private fun Subsection(text: String) {
Text(
modifier = Modifier.semantics { heading() }, <------------------
text = text,
style = MaterialTheme.typography.headlineSmall,
)
I need a way to enforce adding heading()
accesibility semantics for blind people
Is there a Lint check
for this (I'm not seeing one in the stock ones)? Are they maybe coming?
But maybe community made ones? Is it hard to create a custom one that does this?Zach Klippenstein (he/him) [MOD]
01/16/2025, 6:44 PMZach Klippenstein (he/him) [MOD]
01/16/2025, 6:46 PMursus
01/16/2025, 6:46 PM.typography.headlineX
so custom is the only way? is it difficult to do over compose code?Zach Klippenstein (he/him) [MOD]
01/16/2025, 6:47 PMursus
01/16/2025, 6:48 PMZach Klippenstein (he/him) [MOD]
01/16/2025, 6:49 PMursus
01/16/2025, 6:51 PMBigHeader
etc?
but then how do I enforce it's usage? MaerialTheme.typography.headlineSmall
is still public
other than harassing people at code reviewZach Klippenstein (he/him) [MOD]
01/16/2025, 7:43 PMursus
01/16/2025, 10:10 PMMaterialTheme.typography